Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/codetip/app/commander.rb
Instance Method Summary collapse
- #black ⇒ Object
- #blue ⇒ Object
- #bold ⇒ Object
- #gray ⇒ Object
- #green ⇒ Object
- #highlightMessage ⇒ Object
- #red ⇒ Object
Instance Method Details
#black ⇒ Object
4 |
# File 'lib/codetip/app/commander.rb', line 4 def black; "\033[30m#{self}\033[0m" end |
#blue ⇒ Object
7 |
# File 'lib/codetip/app/commander.rb', line 7 def blue; "\033[34m#{self}\033[0m" end |
#bold ⇒ Object
9 |
# File 'lib/codetip/app/commander.rb', line 9 def bold; "\033[1m#{self}\033[22m" end |
#gray ⇒ Object
8 |
# File 'lib/codetip/app/commander.rb', line 8 def gray; "\033[37m#{self}\033[0m" end |
#green ⇒ Object
6 |
# File 'lib/codetip/app/commander.rb', line 6 def green; "\033[32m#{self}\033[0m" end |
#highlightMessage ⇒ Object
10 11 12 |
# File 'lib/codetip/app/commander.rb', line 10 def highlightMessage self.gsub(/(@\w+)/, '\1'.bold) end |
#red ⇒ Object
5 |
# File 'lib/codetip/app/commander.rb', line 5 def red; "\033[31m#{self}\033[0m" end |