Module: LogView::Colors

Included in:
Command, DoSSH, DoTail, OptParser
Defined in:
lib/log_view/colors.rb

Constant Summary collapse

COLOR_CODES =
{
  green:      32,
  red:        31,
  blue:       34,
  yellow:     33,
  light_blue: 36,
  pink:       35
}

Instance Method Summary collapse

Instance Method Details

#paint(color_code, string) ⇒ Object



18
19
20
# File 'lib/log_view/colors.rb', line 18

def paint color_code, string
  "\e[#{color_code}m#{string}\e[0m"
end