Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/techbook.rb
Instance Method Summary collapse
- #blue ⇒ Object
-
#colorize(color_code) ⇒ Object
colorization.
- #green ⇒ Object
- #light_blue ⇒ Object
- #pink ⇒ Object
- #red ⇒ Object
- #yellow ⇒ Object
Instance Method Details
#blue ⇒ Object
32 33 34 |
# File 'lib/techbook.rb', line 32 def blue colorize(34) end |
#colorize(color_code) ⇒ Object
colorization
16 17 18 |
# File 'lib/techbook.rb', line 16 def colorize(color_code) "\e[#{color_code}m#{self}\e[0m" end |
#green ⇒ Object
24 25 26 |
# File 'lib/techbook.rb', line 24 def green colorize(32) end |
#light_blue ⇒ Object
40 41 42 |
# File 'lib/techbook.rb', line 40 def light_blue colorize(36) end |
#pink ⇒ Object
36 37 38 |
# File 'lib/techbook.rb', line 36 def pink colorize(35) end |
#red ⇒ Object
20 21 22 |
# File 'lib/techbook.rb', line 20 def red colorize(31) end |
#yellow ⇒ Object
28 29 30 |
# File 'lib/techbook.rb', line 28 def yellow colorize(33) end |