Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/devlog/utils.rb
Overview
Colors for devlog
Instance Method Summary collapse
- #blue ⇒ Object
- #colorize(text, color_code) ⇒ Object
- #dark_blue ⇒ Object
- #dark_green ⇒ Object
- #green ⇒ Object
- #pur ⇒ Object
- #red ⇒ Object
- #yellow ⇒ Object
Instance Method Details
#blue ⇒ Object
7 |
# File 'lib/devlog/utils.rb', line 7 def blue; colorize(self, "\e[1m\e[34m"); end |
#colorize(text, color_code) ⇒ Object
10 |
# File 'lib/devlog/utils.rb', line 10 def colorize(text, color_code) "#{color_code}#{text}\e[0m" end |
#dark_blue ⇒ Object
8 |
# File 'lib/devlog/utils.rb', line 8 def dark_blue; colorize(self, "\e[34m"); end |
#dark_green ⇒ Object
5 |
# File 'lib/devlog/utils.rb', line 5 def dark_green; colorize(self, "\e[32m"); end |
#green ⇒ Object
4 |
# File 'lib/devlog/utils.rb', line 4 def green; colorize(self, "\e[1m\e[32m"); end |
#pur ⇒ Object
9 |
# File 'lib/devlog/utils.rb', line 9 def pur; colorize(self, "\e[1m\e[35m"); end |
#red ⇒ Object
3 |
# File 'lib/devlog/utils.rb', line 3 def red; colorize(self, "\e[1m\e[31m"); end |
#yellow ⇒ Object
6 |
# File 'lib/devlog/utils.rb', line 6 def yellow; colorize(self, "\e[1m\e[33m"); end |