Class: Tinylinks::Colorizer
- Inherits:
-
Object
- Object
- Tinylinks::Colorizer
- Defined in:
- lib/tinylinks/colorizer.rb
Instance Method Summary collapse
- #bold(text) ⇒ Object
- #cyan(text) ⇒ Object
- #dim(text) ⇒ Object
- #green(text) ⇒ Object
-
#initialize(enabled: true) ⇒ Colorizer
constructor
A new instance of Colorizer.
- #red(text) ⇒ Object
Constructor Details
#initialize(enabled: true) ⇒ Colorizer
Returns a new instance of Colorizer.
5 6 7 |
# File 'lib/tinylinks/colorizer.rb', line 5 def initialize(enabled: true) @enabled = enabled end |
Instance Method Details
#bold(text) ⇒ Object
9 |
# File 'lib/tinylinks/colorizer.rb', line 9 def bold(text) = wrap(text, 1) |
#cyan(text) ⇒ Object
13 |
# File 'lib/tinylinks/colorizer.rb', line 13 def cyan(text) = wrap(text, 36) |
#dim(text) ⇒ Object
10 |
# File 'lib/tinylinks/colorizer.rb', line 10 def dim(text) = wrap(text, 2) |
#green(text) ⇒ Object
12 |
# File 'lib/tinylinks/colorizer.rb', line 12 def green(text) = wrap(text, 32) |
#red(text) ⇒ Object
11 |
# File 'lib/tinylinks/colorizer.rb', line 11 def red(text) = wrap(text, 31) |