Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/degica/core_ext/string.rb
Instance Method Summary collapse
Instance Method Details
#highlight(color = :yellow) ⇒ Object
2 3 4 |
# File 'lib/degica/core_ext/string.rb', line 2 def highlight(color = :yellow) gsub(/\(([A-Za-z\s]+)\)/m, "#{Degica::ANSI.highlight('\1', color)}") end |