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