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