Class: String

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

Instance Method Summary collapse

Instance Method Details

#bg_blackObject



10
# File 'lib/consolor.rb', line 10

def bg_black;       "\033[40m#{self}\0330m"  end

#bg_blueObject



14
# File 'lib/consolor.rb', line 14

def bg_blue;        "\033[44m#{self}\033[0m" end

#bg_brownObject



13
# File 'lib/consolor.rb', line 13

def bg_brown;       "\033[43m#{self}\033[0m" end

#bg_cyanObject



16
# File 'lib/consolor.rb', line 16

def bg_cyan;        "\033[46m#{self}\033[0m" end

#bg_grayObject



17
# File 'lib/consolor.rb', line 17

def bg_gray;        "\033[47m#{self}\033[0m" end

#bg_greenObject



12
# File 'lib/consolor.rb', line 12

def bg_green;       "\033[42m#{self}\033[0m" end

#bg_magentaObject



15
# File 'lib/consolor.rb', line 15

def bg_magenta;     "\033[45m#{self}\033[0m" end

#bg_redObject



11
# File 'lib/consolor.rb', line 11

def bg_red;         "\033[41m#{self}\033[0m" end

#blackObject



2
# File 'lib/consolor.rb', line 2

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

#blueObject



6
# File 'lib/consolor.rb', line 6

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

#boldObject



18
# File 'lib/consolor.rb', line 18

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

#brownObject



5
# File 'lib/consolor.rb', line 5

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

#cyanObject



8
# File 'lib/consolor.rb', line 8

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

#grayObject



9
# File 'lib/consolor.rb', line 9

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

#greenObject



4
# File 'lib/consolor.rb', line 4

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

#magentaObject



7
# File 'lib/consolor.rb', line 7

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

#redObject



3
# File 'lib/consolor.rb', line 3

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

#reverse_colorObject



19
# File 'lib/consolor.rb', line 19

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