Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/gaku/core/console_colors.rb

Instance Method Summary collapse

Instance Method Details

#colorize(color_code) ⇒ Object

colorization



3
4
5
# File 'lib/gaku/core/console_colors.rb', line 3

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

#greenObject



11
12
13
# File 'lib/gaku/core/console_colors.rb', line 11

def green
  colorize(32)
end

#pinkObject



19
20
21
# File 'lib/gaku/core/console_colors.rb', line 19

def pink
  colorize(35)
end

#redObject



7
8
9
# File 'lib/gaku/core/console_colors.rb', line 7

def red
  colorize(31)
end

#yellowObject



15
16
17
# File 'lib/gaku/core/console_colors.rb', line 15

def yellow
  colorize(33)
end