Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/core/string.rb
Instance Method Summary collapse
- #blue ⇒ Object
-
#colorize(color_code) ⇒ Object
Terminal colorization (light-weight version of “colorize” gem).
- #green ⇒ Object
- #light_blue ⇒ Object
- #purple ⇒ Object
- #red ⇒ Object
- #yellow ⇒ Object
Instance Method Details
#blue ⇒ Object
19 20 21 |
# File 'lib/core/string.rb', line 19 def blue colorize(34) end |
#colorize(color_code) ⇒ Object
Terminal colorization (light-weight version of “colorize” gem)
3 4 5 |
# File 'lib/core/string.rb', line 3 def colorize(color_code) "\e[#{color_code}m#{self}\e[0m" end |
#green ⇒ Object
11 12 13 |
# File 'lib/core/string.rb', line 11 def green colorize(32) end |
#light_blue ⇒ Object
27 28 29 |
# File 'lib/core/string.rb', line 27 def light_blue colorize(36) end |
#purple ⇒ Object
23 24 25 |
# File 'lib/core/string.rb', line 23 def purple colorize(35) end |
#red ⇒ Object
7 8 9 |
# File 'lib/core/string.rb', line 7 def red colorize(31) end |
#yellow ⇒ Object
15 16 17 |
# File 'lib/core/string.rb', line 15 def yellow colorize(33) end |