Class: String

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

Instance Method Summary collapse

Instance Method Details

#bg_blackObject



11
# File 'lib/core_ext/string.rb', line 11

def bg_black;       "\e[40m#{self}\e[0m" end

#bg_blueObject



15
# File 'lib/core_ext/string.rb', line 15

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

#bg_brownObject



14
# File 'lib/core_ext/string.rb', line 14

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

#bg_cyanObject



17
# File 'lib/core_ext/string.rb', line 17

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

#bg_grayObject



18
# File 'lib/core_ext/string.rb', line 18

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

#bg_greenObject



13
# File 'lib/core_ext/string.rb', line 13

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

#bg_magentaObject



16
# File 'lib/core_ext/string.rb', line 16

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

#bg_redObject



12
# File 'lib/core_ext/string.rb', line 12

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

#blackObject



2
# File 'lib/core_ext/string.rb', line 2

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


23
# File 'lib/core_ext/string.rb', line 23

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

#blueObject



6
# File 'lib/core_ext/string.rb', line 6

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

#boldObject



20
# File 'lib/core_ext/string.rb', line 20

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

#brownObject



5
# File 'lib/core_ext/string.rb', line 5

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

#cyanObject



8
# File 'lib/core_ext/string.rb', line 8

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

#grayObject



9
# File 'lib/core_ext/string.rb', line 9

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

#greenObject



4
# File 'lib/core_ext/string.rb', line 4

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

#italicObject



21
# File 'lib/core_ext/string.rb', line 21

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

#magentaObject



7
# File 'lib/core_ext/string.rb', line 7

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

#redObject



3
# File 'lib/core_ext/string.rb', line 3

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

#reverse_colorObject



24
# File 'lib/core_ext/string.rb', line 24

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

#underlineObject



22
# File 'lib/core_ext/string.rb', line 22

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