Class: TablePrint::Returnable

Inherits:
Object
  • Object
show all
Defined in:
lib/table_print/returnable.rb

Instance Method Summary collapse

Constructor Details

#initialize(string_value = "") ⇒ Returnable

Returns a new instance of Returnable.



3
4
5
# File 'lib/table_print/returnable.rb', line 3

def initialize(string_value="")
  @string_value = string_value
end

Instance Method Details

#clear(klass) ⇒ Object



12
13
14
15
# File 'lib/table_print/returnable.rb', line 12

def clear(klass)
  TablePrint::Config.clear(klass)
  "Cleared table_print config for #{klass}"
end

#config_for(klass) ⇒ Object



17
18
19
# File 'lib/table_print/returnable.rb', line 17

def config_for(klass)
  TablePrint::Config.for(klass)
end

#inspectObject



25
26
27
# File 'lib/table_print/returnable.rb', line 25

def inspect
  to_s
end

#set(klass, *config) ⇒ Object



7
8
9
10
# File 'lib/table_print/returnable.rb', line 7

def set(klass, *config)
  TablePrint::Config.set(klass, config)
  "Set table_print config for #{klass}"
end

#to_sObject



21
22
23
# File 'lib/table_print/returnable.rb', line 21

def to_s
  @string_value
end