Class: String

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

Instance Method Summary collapse

Instance Method Details

#bg_blackObject

—————bg Color—————–##



40
41
42
# File 'lib/simple_helper/string/string_colorize.rb', line 40

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

#bg_blueObject



56
57
58
# File 'lib/simple_helper/string/string_colorize.rb', line 56

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

#bg_brownObject



52
53
54
# File 'lib/simple_helper/string/string_colorize.rb', line 52

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

#bg_cyanObject



64
65
66
# File 'lib/simple_helper/string/string_colorize.rb', line 64

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

#bg_grayObject



68
69
70
# File 'lib/simple_helper/string/string_colorize.rb', line 68

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

#bg_greenObject



48
49
50
# File 'lib/simple_helper/string/string_colorize.rb', line 48

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

#bg_magentaObject



60
61
62
# File 'lib/simple_helper/string/string_colorize.rb', line 60

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

#bg_redObject



44
45
46
# File 'lib/simple_helper/string/string_colorize.rb', line 44

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

#blackObject

—————bg Color—————–##



6
7
8
# File 'lib/simple_helper/string/string_colorize.rb', line 6

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


85
86
87
# File 'lib/simple_helper/string/string_colorize.rb', line 85

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

#blueObject



22
23
24
# File 'lib/simple_helper/string/string_colorize.rb', line 22

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

#boldObject

—————Fonts——————–##



73
74
75
# File 'lib/simple_helper/string/string_colorize.rb', line 73

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

#brownObject



18
19
20
# File 'lib/simple_helper/string/string_colorize.rb', line 18

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

#cyanObject



30
31
32
# File 'lib/simple_helper/string/string_colorize.rb', line 30

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

#grayObject



34
35
36
# File 'lib/simple_helper/string/string_colorize.rb', line 34

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

#greenObject



14
15
16
# File 'lib/simple_helper/string/string_colorize.rb', line 14

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

#italicObject



77
78
79
# File 'lib/simple_helper/string/string_colorize.rb', line 77

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

#magentaObject



26
27
28
# File 'lib/simple_helper/string/string_colorize.rb', line 26

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

#redObject



10
11
12
# File 'lib/simple_helper/string/string_colorize.rb', line 10

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

#reverse_colorObject



89
90
91
# File 'lib/simple_helper/string/string_colorize.rb', line 89

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

#underlineObject



81
82
83
# File 'lib/simple_helper/string/string_colorize.rb', line 81

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