Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/trunk_spec_helper.rb
Overview
String is an override to the main String class that is used to colorize the output it is used to make the output more readable
Instance Method Summary collapse
Instance Method Details
#colorize(color_code) ⇒ Object
39 40 41 |
# File 'lib/trunk_spec_helper.rb', line 39 def colorize(color_code) "\e[#{color_code}m#{self}\e[0m" end |
#green ⇒ Object
47 48 49 |
# File 'lib/trunk_spec_helper.rb', line 47 def green colorize(32) end |
#red ⇒ Object
43 44 45 |
# File 'lib/trunk_spec_helper.rb', line 43 def red colorize(31) end |
#yellow ⇒ Object
51 52 53 |
# File 'lib/trunk_spec_helper.rb', line 51 def yellow colorize(33) end |