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