Class: WBench::ColoredString

Inherits:
String
  • Object
show all
Defined in:
lib/wbench/colored_string.rb

Instance Method Summary collapse

Constructor Details

#initialize(string, color) ⇒ ColoredString

Returns a new instance of ColoredString.



3
4
5
6
7
8
9
# File 'lib/wbench/colored_string.rb', line 3

def initialize(string, color)
  if WBench.color_output
    super(string.colorize(color))
  else
    super(string)
  end
end