Class: Aruba::Colorizer
- Inherits:
-
Object
- Object
- Aruba::Colorizer
- Defined in:
- lib/aruba/colorizer.rb
Overview
Simple colorizer class. Only supports the color cyan
Class Attribute Summary collapse
-
.coloring ⇒ Object
(also: coloring?)
Returns the value of attribute coloring.
Instance Method Summary collapse
Class Attribute Details
.coloring ⇒ Object Also known as: coloring?
Returns the value of attribute coloring.
6 7 8 |
# File 'lib/aruba/colorizer.rb', line 6 def coloring @coloring end |
Instance Method Details
#cyan(string) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/aruba/colorizer.rb', line 11 def cyan(string) if self.class.coloring? "\e[36m#{string}\e[0m" else string end end |