Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/mycommands/views/view.rb
Overview
For more formating options: en.wikipedia.org/wiki/ANSI_escape_code#Codes
Instance Method Summary collapse
- #black ⇒ Object
- #blue ⇒ Object
- #cyan ⇒ Object
- #green ⇒ Object
- #normal ⇒ Object
- #red ⇒ Object
- #underline ⇒ Object
- #yellow ⇒ Object
Instance Method Details
#black ⇒ Object
11 12 13 |
# File 'lib/mycommands/views/view.rb', line 11 def black "\e[30m#{self}\e[0m" end |
#blue ⇒ Object
23 24 25 |
# File 'lib/mycommands/views/view.rb', line 23 def blue "\e[94m#{self}\e[0m" end |
#cyan ⇒ Object
26 27 28 |
# File 'lib/mycommands/views/view.rb', line 26 def cyan "\e[96m#{self}\e[0m" end |
#green ⇒ Object
17 18 19 |
# File 'lib/mycommands/views/view.rb', line 17 def green "\e[92m#{self}\e[0m" end |
#normal ⇒ Object
5 6 7 |
# File 'lib/mycommands/views/view.rb', line 5 def normal self end |
#red ⇒ Object
14 15 16 |
# File 'lib/mycommands/views/view.rb', line 14 def red "\e[91m#{self}\e[0m" end |
#underline ⇒ Object
8 9 10 |
# File 'lib/mycommands/views/view.rb', line 8 def underline "\e[4m#{self}\e[0m" end |
#yellow ⇒ Object
20 21 22 |
# File 'lib/mycommands/views/view.rb', line 20 def yellow "\e[93m#{self}\e[0m" end |