Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/helpers/colorize.rb
Overview
This is an extension of the Ruby String class. Example usage: puts “This message is red”.red From stackoverflow.com/a/11482430/3038677
Defined Under Namespace
Modules: Colors
Instance Method Summary collapse
Instance Method Details
#green ⇒ Object
18 19 20 |
# File 'lib/helpers/colorize.rb', line 18 def green colorize(Colors::GREEN) end |
#magenta ⇒ Object
26 27 28 |
# File 'lib/helpers/colorize.rb', line 26 def magenta colorize(Colors::MAGENTA) end |
#red ⇒ Object
14 15 16 |
# File 'lib/helpers/colorize.rb', line 14 def red colorize(Colors::RED) end |
#yellow ⇒ Object
22 23 24 |
# File 'lib/helpers/colorize.rb', line 22 def yellow colorize(Colors::YELLOW) end |