class Color

Public Class Methods

c(num) click to toggle source
# File lib/color.rb, line 25
def c(num)
  print "\e[#{num.to_s}m"
end
set(str) click to toggle source
# File lib/color.rb, line 5
def set(str)
  case str
  when 'reset'
    c 0
  when 'red'
    c 31
  when 'green'
    c 32
  when 'yellow'
    c 33
  when 'blue'
    c 34
  when 'magenta'
    c 35
  when 'cyan'
    c 36
  when 'white'
    c 37
  end
end