Class: String

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

Instance Method Summary collapse

Instance Method Details

#colorize(text, color_code) ⇒ Object

colorization



3
4
5
# File 'lib/kawaii/command.rb', line 3

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

#greenObject



10
11
12
# File 'lib/kawaii/command.rb', line 10

def green
	colorize(self, 32)
end

#pinkObject



16
17
18
# File 'lib/kawaii/command.rb', line 16

def pink
	colorize(self, 35)
end

#redObject



7
8
9
# File 'lib/kawaii/command.rb', line 7

def red
	colorize(self, 31)
end

#yellowObject



13
14
15
# File 'lib/kawaii/command.rb', line 13

def yellow
	colorize(self, 33)
end