Class: Colorlib::ColorBuilder

Inherits:
ColoredCompound show all
Defined in:
lib/colorlib/color_builder.rb

Instance Method Summary collapse

Methods inherited from ColoredCompound

#append, #initialize, #make, register_maker

Constructor Details

This class inherits a constructor from Colorlib::ColoredCompound

Instance Method Details

#black(text) ⇒ Object



14
# File 'lib/colorlib/color_builder.rb', line 14

def black(text);   color text, :black;   end

#blue(text) ⇒ Object



12
# File 'lib/colorlib/color_builder.rb', line 12

def blue(text);    color text, :blue;    end

#color(string, color) ⇒ Object



6
7
8
# File 'lib/colorlib/color_builder.rb', line 6

def color(string, color)
  self << string.color(color)
end

#green(text) ⇒ Object



11
# File 'lib/colorlib/color_builder.rb', line 11

def green(text);   color text, :green;   end

#red(text) ⇒ Object



10
# File 'lib/colorlib/color_builder.rb', line 10

def red(text);     color text, :red;     end

#white(text) ⇒ Object



15
# File 'lib/colorlib/color_builder.rb', line 15

def white(text);   color text, :white;   end

#yellow(text) ⇒ Object



13
# File 'lib/colorlib/color_builder.rb', line 13

def yellow(text);  color text, :yellow;  end