Class: String

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

Instance Method Summary collapse

Instance Method Details



47
48
49
# File 'lib/thesis/colorizer.rb', line 47

def blink
  colorize 5
end

#blueObject



31
32
33
# File 'lib/thesis/colorizer.rb', line 31

def blue
  colorize 34
end

#boldObject



43
44
45
# File 'lib/thesis/colorizer.rb', line 43

def bold
  colorize 1
end

#brownObject



27
28
29
# File 'lib/thesis/colorizer.rb', line 27

def brown
  colorize 33
end

#colorize(color_code) ⇒ Object

colorization



3
4
5
# File 'lib/thesis/colorizer.rb', line 3

def colorize(color_code)
  "\e[#{color_code}m#{self}\e[0m"
end

#cyanObject



39
40
41
# File 'lib/thesis/colorizer.rb', line 39

def cyan
  colorize 36
end

#grayObject



23
24
25
# File 'lib/thesis/colorizer.rb', line 23

def gray
  colorize 37
end

#greenObject



11
12
13
# File 'lib/thesis/colorizer.rb', line 11

def green
  colorize 32
end

#magentaObject



35
36
37
# File 'lib/thesis/colorizer.rb', line 35

def magenta
  colorize 35
end

#pinkObject



19
20
21
# File 'lib/thesis/colorizer.rb', line 19

def pink
  colorize 35
end

#redObject



7
8
9
# File 'lib/thesis/colorizer.rb', line 7

def red
  colorize 31
end

#yellowObject



15
16
17
# File 'lib/thesis/colorizer.rb', line 15

def yellow
  colorize 33
end