Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/compute_unit/monkey_patches.rb
Instance Method Summary collapse
Instance Method Details
#colorize(color_code) ⇒ Object
44 45 46 |
# File 'lib/compute_unit/monkey_patches.rb', line 44 def colorize(color_code) "\e[#{color_code}m#{self}\e[0m" end |
#fatal ⇒ Object
56 57 58 |
# File 'lib/compute_unit/monkey_patches.rb', line 56 def fatal red end |
#green ⇒ Object
52 53 54 |
# File 'lib/compute_unit/monkey_patches.rb', line 52 def green colorize(32) end |
#red ⇒ Object
48 49 50 |
# File 'lib/compute_unit/monkey_patches.rb', line 48 def red colorize(31) end |
#yellow ⇒ Object
60 61 62 |
# File 'lib/compute_unit/monkey_patches.rb', line 60 def yellow colorize(33) end |