Class: String

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

Instance Method Summary collapse

Instance Method Details

#blueObject

Colors



5
6
7
# File 'lib/ext/string.rb', line 5

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

#greenObject



9
10
11
# File 'lib/ext/string.rb', line 9

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

#redObject



13
14
15
# File 'lib/ext/string.rb', line 13

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

#yellowObject



17
18
19
# File 'lib/ext/string.rb', line 17

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