Class: Ppl::Adapter::Color::Colored

Inherits:
Object
  • Object
show all
Defined in:
lib/ppl/adapter/color/colored.rb

Instance Method Summary collapse

Instance Method Details

#colorize(string, color) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/ppl/adapter/color/colored.rb', line 5

def colorize(string, color)
  if Colored::COLORS[color].nil?
    string
  else
    string.send(color)
  end
end