Module: Super::Color
- Included in:
- String
- Defined in:
- lib/super/color.rb,
lib/super/color/version.rb
Constant Summary collapse
- VERSION =
"0.1.3"
Instance Method Summary collapse
- #green ⇒ Object (also: #color_success)
- #magenta ⇒ Object
- #puts_error ⇒ Object
- #puts_success ⇒ Object
- #puts_warning ⇒ Object
- #red ⇒ Object (also: #color_error)
- #yellow ⇒ Object (also: #color_warning)
Instance Method Details
#green ⇒ Object Also known as: color_success
12 13 14 |
# File 'lib/super/color.rb', line 12 def green "\e[92m#{self}\e[0m" end |
#magenta ⇒ Object
20 21 22 |
# File 'lib/super/color.rb', line 20 def magenta "\e[35m#{self}\e[0m" end |
#puts_error ⇒ Object
36 37 38 |
# File 'lib/super/color.rb', line 36 def puts_error puts red end |
#puts_success ⇒ Object
32 33 34 |
# File 'lib/super/color.rb', line 32 def puts_success puts green end |
#puts_warning ⇒ Object
28 29 30 |
# File 'lib/super/color.rb', line 28 def puts_warning puts yellow end |
#red ⇒ Object Also known as: color_error
8 9 10 |
# File 'lib/super/color.rb', line 8 def red "\e[31m#{self}\e[0m" end |
#yellow ⇒ Object Also known as: color_warning
16 17 18 |
# File 'lib/super/color.rb', line 16 def yellow "\e[93m#{self}\e[0m" end |