Module: RakeColorizer
- Defined in:
- lib/monsanto/rake_colorizer.rb
Instance Method Summary collapse
- #colorize(text, color_code) ⇒ Object
- #cyan(text) ⇒ Object
- #green(text) ⇒ Object
- #magenta(text) ⇒ Object
- #purple(text) ⇒ Object
- #red(text) ⇒ Object
- #yellow(text) ⇒ Object
Instance Method Details
#colorize(text, color_code) ⇒ Object
3 4 5 |
# File 'lib/monsanto/rake_colorizer.rb', line 3 def colorize(text, color_code) "\e[#{color_code}m#{text}\e[0m" end |
#cyan(text) ⇒ Object
12 |
# File 'lib/monsanto/rake_colorizer.rb', line 12 def cyan(text); colorize(text, 36); end |
#green(text) ⇒ Object
8 |
# File 'lib/monsanto/rake_colorizer.rb', line 8 def green(text); colorize(text, 32); end |
#magenta(text) ⇒ Object
11 |
# File 'lib/monsanto/rake_colorizer.rb', line 11 def magenta(text); colorize(text, 35); end |
#purple(text) ⇒ Object
10 |
# File 'lib/monsanto/rake_colorizer.rb', line 10 def purple(text); colorize(text, 34); end |
#red(text) ⇒ Object
7 |
# File 'lib/monsanto/rake_colorizer.rb', line 7 def red(text); colorize(text, 31); end |
#yellow(text) ⇒ Object
9 |
# File 'lib/monsanto/rake_colorizer.rb', line 9 def yellow(text); colorize(text, 33); end |