Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/text_shade.rb
Instance Method Summary collapse
-
#black ⇒ String
color black method defined on string object.
-
#blue ⇒ String
color blue method defined on string object.
-
#cyan ⇒ String
color cyan method defined on string object.
-
#green ⇒ String
color green method defined on string object.
-
#light_blue ⇒ String
color light blue method defined on string object.
-
#light_cyan ⇒ String
color light cyan method defined on string object.
-
#light_gray ⇒ String
color light gray method defined on string object.
-
#light_green ⇒ String
color light green method defined on string object.
-
#light_magenta ⇒ String
color light magenta method defined on string object.
-
#light_red ⇒ String
color light red method defined on string object.
-
#light_yellow ⇒ String
color light yellow method defined on string object.
-
#magenta ⇒ String
color magenta method defined on string object.
-
#red ⇒ String
color red method defined on string object.
-
#shade(code) ⇒ string
apply color to string object.
-
#yellow ⇒ String
color yellow method defined on string object.
Instance Method Details
#black ⇒ String
color black method defined on string object
13 14 15 |
# File 'lib/text_shade.rb', line 13 def black shade(30) end |
#blue ⇒ String
color blue method defined on string object
41 42 43 |
# File 'lib/text_shade.rb', line 41 def blue shade(34) end |
#cyan ⇒ String
color cyan method defined on string object
55 56 57 |
# File 'lib/text_shade.rb', line 55 def cyan shade(36) end |
#green ⇒ String
color green method defined on string object
27 28 29 |
# File 'lib/text_shade.rb', line 27 def green shade(32) end |
#light_blue ⇒ String
color light blue method defined on string object
90 91 92 |
# File 'lib/text_shade.rb', line 90 def light_blue shade(94) end |
#light_cyan ⇒ String
color light cyan method defined on string object
104 105 106 |
# File 'lib/text_shade.rb', line 104 def light_cyan shade(96) end |
#light_gray ⇒ String
color light gray method defined on string object
62 63 64 |
# File 'lib/text_shade.rb', line 62 def light_gray shade(37) end |
#light_green ⇒ String
color light green method defined on string object
76 77 78 |
# File 'lib/text_shade.rb', line 76 def light_green shade(92) end |
#light_magenta ⇒ String
color light magenta method defined on string object
97 98 99 |
# File 'lib/text_shade.rb', line 97 def light_magenta shade(95) end |
#light_red ⇒ String
color light red method defined on string object
69 70 71 |
# File 'lib/text_shade.rb', line 69 def light_red shade(91) end |
#light_yellow ⇒ String
color light yellow method defined on string object
83 84 85 |
# File 'lib/text_shade.rb', line 83 def light_yellow shade(93) end |
#magenta ⇒ String
color magenta method defined on string object
48 49 50 |
# File 'lib/text_shade.rb', line 48 def magenta shade(35) end |
#red ⇒ String
color red method defined on string object
20 21 22 |
# File 'lib/text_shade.rb', line 20 def red shade(31) end |
#shade(code) ⇒ string
apply color to string object
6 7 8 |
# File 'lib/text_shade.rb', line 6 def shade(code) puts "\e[#{code}m#{self}\e[0m" end |
#yellow ⇒ String
color yellow method defined on string object
34 35 36 |
# File 'lib/text_shade.rb', line 34 def yellow shade(33) end |