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