class AsciiParadise::AsciiTable::Style

Constants

DEFAULTS
#

DEFAULTS

Three different tokens are possible as border style, which are '-','|' and '+'.

#

Attributes

border_i[RW]
border_x[RW]
border_y[RW]
padding_left[RW]
padding_right[RW]

Public Class Methods

defaults() click to toggle source
#

Style.defaults

#
# File lib/ascii_paradise/asciitable/style.rb, line 78
def self.defaults # Can be called like so: Style.defaults
  DEFAULTS
end
defaults=(i) click to toggle source
#

Style.defaults=

#
# File lib/ascii_paradise/asciitable/style.rb, line 85
def self.defaults=(i)
  defaults.merge(i) # Call the above method here.
end
new(i = {}) click to toggle source
#

initialize

#
# File lib/ascii_paradise/asciitable/style.rb, line 60
def initialize(i = {})
  apply(
    self.class.defaults.merge(i)
  )
end

Public Instance Methods

apply(i) click to toggle source
#

apply

The input to this method should be an Array.

#
# File lib/ascii_paradise/asciitable/style.rb, line 71
def apply(i)
  i.each { |m, v| __send__ "#{m}=", v }
end
width()
Alias for: width?
width=(i) click to toggle source
#

width=

#
# File lib/ascii_paradise/asciitable/style.rb, line 99
def width=(i)
  @width = i
end
width?() click to toggle source
#

width?

#
# File lib/ascii_paradise/asciitable/style.rb, line 92
def width?
  @width
end
Also aliased as: width