class TablePrint::Config

Constants

DEFAULT_MAX_WIDTH
DEFAULT_TIME_FORMAT

Public Class Methods

clear(klass) click to toggle source
# File lib/table_print/config.rb, line 25
def self.clear(klass)
  if klass.is_a? Class
    @@klasses.delete(klass)
  else
    original_value = TablePrint::Config.const_get("DEFAULT_#{klass.to_s.upcase}")
    TablePrint::Config.send("#{klass}=", original_value)
  end
end
for(klass) click to toggle source
# File lib/table_print/config.rb, line 21
def self.for(klass)
  @@klasses.fetch(klass) {}
end
max_width() click to toggle source
# File lib/table_print/config.rb, line 34
def self.max_width
  @@max_width
end
max_width=(width) click to toggle source
# File lib/table_print/config.rb, line 38
def self.max_width=(width)
  @@max_width = width
end
multibyte() click to toggle source
# File lib/table_print/config.rb, line 42
def self.multibyte
  @@multibyte
end
multibyte=(width) click to toggle source
# File lib/table_print/config.rb, line 46
def self.multibyte=(width)
  @@multibyte = width
end
set(klass, val) click to toggle source
# File lib/table_print/config.rb, line 13
def self.set(klass, val)
  if klass.is_a? Class
    @@klasses[klass] = val  # val is a hash of column options
  else
    TablePrint::Config.send("#{klass}=", val.first)
  end
end
time_format() click to toggle source
# File lib/table_print/config.rb, line 50
def self.time_format
  @@time_format
end
time_format=(format) click to toggle source
# File lib/table_print/config.rb, line 54
def self.time_format=(format)
  @@time_format = format
end