Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/ubcbooker/color.rb

Instance Method Summary collapse

Instance Method Details

#blackObject



2
# File 'lib/ubcbooker/color.rb', line 2

def black;          "\e[30m#{self}\e[0m" end


14
# File 'lib/ubcbooker/color.rb', line 14

def blink;          "\e[5m#{self}\e[25m" end

#blueObject



6
# File 'lib/ubcbooker/color.rb', line 6

def blue;           "\e[34m#{self}\e[0m" end

#boldObject



11
# File 'lib/ubcbooker/color.rb', line 11

def bold;           "\e[1m#{self}\e[22m" end

#brownObject



5
# File 'lib/ubcbooker/color.rb', line 5

def brown;          "\e[33m#{self}\e[0m" end

#cyanObject



8
# File 'lib/ubcbooker/color.rb', line 8

def cyan;           "\e[36m#{self}\e[0m" end

#grayObject



9
# File 'lib/ubcbooker/color.rb', line 9

def gray;           "\e[37m#{self}\e[0m" end

#greenObject



4
# File 'lib/ubcbooker/color.rb', line 4

def green;          "\e[32m#{self}\e[0m" end

#italicObject



12
# File 'lib/ubcbooker/color.rb', line 12

def italic;         "\e[3m#{self}\e[23m" end

#magentaObject



7
# File 'lib/ubcbooker/color.rb', line 7

def magenta;        "\e[35m#{self}\e[0m" end

#redObject



3
# File 'lib/ubcbooker/color.rb', line 3

def red;            "\e[31m#{self}\e[0m" end

#reverse_colorObject



15
# File 'lib/ubcbooker/color.rb', line 15

def reverse_color;  "\e[7m#{self}\e[27m" end

#underlineObject



13
# File 'lib/ubcbooker/color.rb', line 13

def underline;      "\e[4m#{self}\e[24m" end