Module: Helpers::Colorize

Defined in:
lib/helpers/colorize.rb

Defined Under Namespace

Modules: Colors

Class Method Summary collapse

Class Method Details

.colorize(color, text) ⇒ Object



25
26
27
28
29
30
31
32
# File 'lib/helpers/colorize.rb', line 25

def colorize(color, text)
  color = Colorize::Colors.const_get(color.to_s.upcase)
  color ? colorful_text(color, text) : text
rescue
#        puts color
#        puts $?
  text
end

.method_missing(symbol, *args) ⇒ Object



34
35
36
37
38
39
40
41
42
43
# File 'lib/helpers/colorize.rb', line 34

def method_missing(symbol, *args)
  color = Colorize::Colors.const_get(color.to_s.upcase)
  return colorful_text(color, *args) if color
  super
rescue
  super
#        puts symbol
#        puts $?
#        args
end