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.
8 9 10 |
# File 'lib/aruba/colorizer.rb', line 8 def coloring @coloring end |
Instance Method Details
#cyan(string) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/aruba/colorizer.rb', line 13 def cyan(string) if self.class.coloring? "\e[36m#{string}\e[0m" else string end end |