Module: Cl::Ui::Colors

Included in:
Tty
Defined in:
lib/cl/ui.rb

Constant Summary collapse

COLORS =
{
  red:    "\e[31m",
  green:  "\e[32m",
  yellow: "\e[33m",
  blue:   "\e[34m",
  gray:   "\e[37m",
  reset:  "\e[0m"
}

Instance Method Summary collapse

Instance Method Details

#colored(color, str) ⇒ Object



86
87
88
# File 'lib/cl/ui.rb', line 86

def colored(color, str)
  [COLORS[color], str, COLORS[:reset]].join
end