Class: ListColorizer

Inherits:
Object show all
Defined in:
lib/list_colorizer.rb

Class Method Summary collapse

Class Method Details

.call(str) ⇒ Object



2
3
4
5
6
# File 'lib/list_colorizer.rb', line 2

def self.call(str)
  str.
    gsub(/^([^ :]+)/) { $1.colorize(:green) }.
    gsub(/^  (\w+)/) { "  " + $1.colorize(:bright_blue) }
end