Module: Gem::Release::Context::Ui::Colors

Included in:
Tty
Defined in:
lib/gem/release/context/ui.rb

Constant Summary collapse

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

Instance Method Summary collapse

Instance Method Details

#colored(color, str) ⇒ Object


66
67
68
# File 'lib/gem/release/context/ui.rb', line 66

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