Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/results_keeper/string.rb
Instance Method Summary collapse
Instance Method Details
#blue ⇒ Object
10 11 12 |
# File 'lib/results_keeper/string.rb', line 10 def blue colorize(96) end |
#colorize(color_code) ⇒ Object
2 3 4 |
# File 'lib/results_keeper/string.rb', line 2 def colorize(color_code) "\e[#{color_code}m#{self}\e[0m" end |
#green ⇒ Object
14 15 16 |
# File 'lib/results_keeper/string.rb', line 14 def green colorize(92) end |
#red ⇒ Object
6 7 8 |
# File 'lib/results_keeper/string.rb', line 6 def red colorize(31) end |
#yellow ⇒ Object
18 19 20 |
# File 'lib/results_keeper/string.rb', line 18 def yellow colorize(33) end |