class Terminal::Table::AsciiBorder
Constants
- HORIZONTALS
- INTERSECTIONS
- VERTICALS
Public Class Methods
new()
click to toggle source
Calls superclass method
Terminal::Table::Border::new
# File lib/terminal-table/style.rb, line 44 def initialize super @data = { x: "-", y: "|", i: "+" } end
Public Instance Methods
horizontal(_type)
click to toggle source
Get horizontal border elements @return [Array] a 6 element list of: [i-left, horizontal-bar, i-up/down, i-right, i-down, i-up]
# File lib/terminal-table/style.rb, line 57 def horizontal(_type) x, i = @data[:x], @data[:i] [maybeleft(:i), x, i, mayberight(:i), i, i] end
vertical()
click to toggle source
Get vertical border elements @return [Array] 3-element list of [left, center, right]
# File lib/terminal-table/style.rb, line 51 def vertical [maybeleft(:y), @data[:y], mayberight(:y)] # left, center, right end