class TablePrint::Config
def self.capitalize_headers
def self.capitalize_headers @@capitalize_headers end
def self.capitalize_headers=(caps)
def self.capitalize_headers=(caps) @@capitalize_headers = caps end
def self.clear(klass)
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
def self.for(klass)
def self.for(klass) @@klasses.fetch(klass) {} end
def self.io
def self.io @@io end
def self.io=(io)
def self.io=(io) raise StandardError.new("IO object must respond to :puts") unless io.respond_to? :puts @@io = io end
def self.max_width
def self.max_width @@max_width end
def self.max_width=(width)
def self.max_width=(width) @@max_width = width end
def self.multibyte
def self.multibyte @@multibyte end
def self.multibyte=(width)
def self.multibyte=(width) @@multibyte = width end
def self.separator
def self.separator @@separator end
def self.separator=(separator)
def self.separator=(separator) @@separator = separator end
def self.set(klass, val)
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
def self.time_format
def self.time_format @@time_format end
def self.time_format=(format)
def self.time_format=(format) @@time_format = format end