module What::Colors

Public Instance Methods

bg_black(str) click to toggle source
# File lib/what.rb, line 15
def bg_black(str)   "\e[40m#{str}\e[0m" end
bg_blue(str) click to toggle source
# File lib/what.rb, line 19
def bg_blue(str)    "\e[44m#{str}\e[0m" end
bg_brown(str) click to toggle source
# File lib/what.rb, line 18
def bg_brown(str)   "\e[43m#{str}\e[0m" end
bg_cyan(str) click to toggle source
# File lib/what.rb, line 21
def bg_cyan(str)    "\e[46m#{str}\e[0m" end
bg_gray(str) click to toggle source
# File lib/what.rb, line 22
def bg_gray(str)    "\e[47m#{str}\e[0m" end
bg_green(str) click to toggle source
# File lib/what.rb, line 17
def bg_green(str)   "\e[42m#{str}\e[0m" end
bg_magenta(str) click to toggle source
# File lib/what.rb, line 20
def bg_magenta(str) "\e[45m#{str}\e[0m" end
bg_red(str) click to toggle source
# File lib/what.rb, line 16
def bg_red(str)     "\e[41m#{str}\e[0m" end
black(str) click to toggle source
# File lib/what.rb, line 6
def black(str)      "\e[30m#{str}\e[0m" end
blue(str) click to toggle source
# File lib/what.rb, line 10
def blue(str)       "\e[34m#{str}\e[0m" end
bold(str) click to toggle source
# File lib/what.rb, line 24
def bold(str)       "\e[1m#{str}\e[21m" end
brown(str) click to toggle source
# File lib/what.rb, line 9
def brown(str)      "\e[33m#{str}\e[0m" end
cyan(str) click to toggle source
# File lib/what.rb, line 12
def cyan(str)       "\e[36m#{str}\e[0m" end
gray(str) click to toggle source
# File lib/what.rb, line 13
def gray(str)       "\e[37m#{str}\e[0m" end
green(str) click to toggle source
# File lib/what.rb, line 8
def green(str)      "\e[32m#{str}\e[0m" end
italic(str) click to toggle source
# File lib/what.rb, line 25
def italic(str)     "\e[3m#{str}\e[23m" end
magenta(str) click to toggle source
# File lib/what.rb, line 11
def magenta(str)    "\e[35m#{str}\e[0m" end
red(str) click to toggle source
# File lib/what.rb, line 7
def red(str)        "\e[31m#{str}\e[0m" end
reverse(str) click to toggle source
# File lib/what.rb, line 28
def reverse(str)    "\e[7m#{str}\e[27m" end
underline(str) click to toggle source
# File lib/what.rb, line 26
def underline(str)  "\e[4m#{str}\e[24m" end