class Terminal::Table::Border
Attributes
bottom[RW]
data[RW]
left[RW]
right[RW]
top[RW]
Public Class Methods
new()
click to toggle source
# File lib/terminal-table/style.rb, line 9 def initialize @top, @bottom, @left, @right = true, true, true, true end
Public Instance Methods
[](key)
click to toggle source
# File lib/terminal-table/style.rb, line 15 def [](key) @data[key] end
[]=(key, val)
click to toggle source
# File lib/terminal-table/style.rb, line 12 def []=(key, val) @data[key] = val end
initialize_dup(other)
click to toggle source
Calls superclass method
# File lib/terminal-table/style.rb, line 18 def initialize_dup(other) super @data = other.data.dup end
maybeleft(key)
click to toggle source
If @left, return the edge else empty-string.
# File lib/terminal-table/style.rb, line 31 def maybeleft(key) ; @left ? @data[key] : '' ; end
mayberight(key)
click to toggle source
If @right, return the edge else empty-string.
# File lib/terminal-table/style.rb, line 34 def mayberight(key) ; @right ? @data[key] : '' ; end
remove_horizontals()
click to toggle source
# File lib/terminal-table/style.rb, line 26 def remove_horizontals self.class.const_get("HORIZONTALS").each { |key| @data[key] = "" } end
remove_verticals()
click to toggle source
# File lib/terminal-table/style.rb, line 22 def remove_verticals self.class.const_get("VERTICALS").each { |key| @data[key] = "" } self.class.const_get("INTERSECTIONS").each { |key| @data[key] = "" } end