class SpellCheck::ColorString

Constants

GREEN
LIGHT_BLUE
RED

Public Class Methods

green(str) click to toggle source
# File lib/spellcheck/color_string.rb, line 12
def green(str)
  colorize(str, GREEN)
end
light_blue(str) click to toggle source
# File lib/spellcheck/color_string.rb, line 16
def light_blue(str)
  colorize(str, LIGHT_BLUE)
end
red(str) click to toggle source
# File lib/spellcheck/color_string.rb, line 8
def red(str)
  colorize(str, RED)
end

Private Class Methods

colorize(str, color_code) click to toggle source
# File lib/spellcheck/color_string.rb, line 22
def colorize(str, color_code)
  "\e[#{color_code}m#{str}\e[0m"
end