Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/ubcbooker/color.rb
Instance Method Summary collapse
- #black ⇒ Object
- #blink ⇒ Object
- #blue ⇒ Object
- #bold ⇒ Object
- #brown ⇒ Object
- #cyan ⇒ Object
- #gray ⇒ Object
- #green ⇒ Object
- #italic ⇒ Object
- #magenta ⇒ Object
- #red ⇒ Object
- #reverse_color ⇒ Object
- #underline ⇒ Object
Instance Method Details
#black ⇒ Object
2 |
# File 'lib/ubcbooker/color.rb', line 2 def black; "\e[30m#{self}\e[0m" end |
#blink ⇒ Object
14 |
# File 'lib/ubcbooker/color.rb', line 14 def blink; "\e[5m#{self}\e[25m" end |
#blue ⇒ Object
6 |
# File 'lib/ubcbooker/color.rb', line 6 def blue; "\e[34m#{self}\e[0m" end |
#bold ⇒ Object
11 |
# File 'lib/ubcbooker/color.rb', line 11 def bold; "\e[1m#{self}\e[22m" end |
#brown ⇒ Object
5 |
# File 'lib/ubcbooker/color.rb', line 5 def brown; "\e[33m#{self}\e[0m" end |
#cyan ⇒ Object
8 |
# File 'lib/ubcbooker/color.rb', line 8 def cyan; "\e[36m#{self}\e[0m" end |
#gray ⇒ Object
9 |
# File 'lib/ubcbooker/color.rb', line 9 def gray; "\e[37m#{self}\e[0m" end |
#green ⇒ Object
4 |
# File 'lib/ubcbooker/color.rb', line 4 def green; "\e[32m#{self}\e[0m" end |
#italic ⇒ Object
12 |
# File 'lib/ubcbooker/color.rb', line 12 def italic; "\e[3m#{self}\e[23m" end |
#magenta ⇒ Object
7 |
# File 'lib/ubcbooker/color.rb', line 7 def magenta; "\e[35m#{self}\e[0m" end |
#red ⇒ Object
3 |
# File 'lib/ubcbooker/color.rb', line 3 def red; "\e[31m#{self}\e[0m" end |
#reverse_color ⇒ Object
15 |
# File 'lib/ubcbooker/color.rb', line 15 def reverse_color; "\e[7m#{self}\e[27m" end |
#underline ⇒ Object
13 |
# File 'lib/ubcbooker/color.rb', line 13 def underline; "\e[4m#{self}\e[24m" end |