Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/cch/extensions/string.rb
Instance Method Summary collapse
Instance Method Details
#color(text, background = :no_color) ⇒ Object
2 3 4 |
# File 'lib/cch/extensions/string.rb', line 2 def color(text, background = :no_color) "\e[3#{color_code(text)}m\e[4#{color_code(background)}m#{self}\e[0m" end |