Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/fif/utils.rb
Instance Method Summary collapse
-
#colorize(color_code) ⇒ Object
colorization.
- #green ⇒ Object
- #red ⇒ Object
Instance Method Details
#colorize(color_code) ⇒ Object
colorization
19 20 21 |
# File 'lib/fif/utils.rb', line 19 def colorize(color_code) "\e[#{color_code}m#{self}\e[0m" end |
#green ⇒ Object
27 28 29 |
# File 'lib/fif/utils.rb', line 27 def green colorize(32) end |
#red ⇒ Object
23 24 25 |
# File 'lib/fif/utils.rb', line 23 def red colorize(31) end |