class Terminal::Table::Border
Attributes
Public Class Methods
Source
# File lib/terminal-table/style.rb, line 10 def initialize @top, @bottom, @left, @right = true, true, true, true end
Public Instance Methods
Source
# File lib/terminal-table/style.rb, line 13 def []=(key, val) @data[key] = val end
Source
# File lib/terminal-table/style.rb, line 19 def initialize_dup(other) super @data = other.data.dup end
Calls superclass method
Source
# File lib/terminal-table/style.rb, line 32 def maybeleft(key) ; @left ? @data[key] : '' ; end
If @left, return the edge else empty-string.
Source
# File lib/terminal-table/style.rb, line 35 def mayberight(key) ; @right ? @data[key] : '' ; end
If @right, return the edge else empty-string.
Source
# File lib/terminal-table/style.rb, line 27 def remove_horizontals self.class.const_get("HORIZONTALS").each { |key| @data[key] = "" } end
Source
# File lib/terminal-table/style.rb, line 23 def remove_verticals self.class.const_get("VERTICALS").each { |key| @data[key] = "" } self.class.const_get("INTERSECTIONS").each { |key| @data[key] = "" } end