Module: Colors
Instance Method Summary collapse
Instance Method Details
#colorize(text, color_code) ⇒ Object
4 5 6 |
# File 'lib/dependence/colors.rb', line 4 def colorize(text, color_code) "\e[#{color_code}m#{text}\e[0m" end |
#green(text) ⇒ Object
9 |
# File 'lib/dependence/colors.rb', line 9 def green(text); colorize(text, 32); end |
#red(text) ⇒ Object
8 |
# File 'lib/dependence/colors.rb', line 8 def red(text); colorize(text, 31); end |