Class: String

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

Instance Method Summary collapse

Instance Method Details

#greenObject



2
3
4
# File 'lib/ext/string.rb', line 2

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

#magentaObject



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

def magenta
  "\e[35m#{self}\e[0m"
end

#redObject



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

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