Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/chobo/commands.rb

Instance Method Summary collapse

Instance Method Details

#colorize(color_code) ⇒ Object



2
3
4
# File 'lib/chobo/commands.rb', line 2

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

#greenObject



9
10
11
# File 'lib/chobo/commands.rb', line 9

def green
	colorize(32)
end

#pinkObject



15
16
17
# File 'lib/chobo/commands.rb', line 15

def pink
	colorize(35)
end

#redObject



6
7
8
# File 'lib/chobo/commands.rb', line 6

def red
	colorize(31)
end

#yellowObject



12
13
14
# File 'lib/chobo/commands.rb', line 12

def yellow
	colorize(33)
end