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 10
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 16
def [](key)
  @data[key]
end
[]=(key, val) click to toggle source
# File lib/terminal-table/style.rb, line 13
def []=(key, val)
  @data[key] = val
end
initialize_dup(other) click to toggle source
Calls superclass method
# File lib/terminal-table/style.rb, line 19
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 32
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 35
def mayberight(key) ; @right ? @data[key] : '' ; end
remove_horizontals() click to toggle source
# File lib/terminal-table/style.rb, line 27
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 23
def remove_verticals 
  self.class.const_get("VERTICALS").each { |key| @data[key] = "" }
  self.class.const_get("INTERSECTIONS").each { |key| @data[key] = "" }
end