Class: String

Inherits:
Object show all
Defined in:
rake_modules/monkey_patch.rb

Direct Known Subclasses

AlsoString

Instance Method Summary collapse

Instance Method Details

#colorize(color_code) ⇒ Object



21
22
23
# File 'rake_modules/monkey_patch.rb', line 21

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

#greenObject



29
30
31
# File 'rake_modules/monkey_patch.rb', line 29

def green
  colorize("\033[32m")
end

#redObject



25
26
27
# File 'rake_modules/monkey_patch.rb', line 25

def red
  colorize("\033[31m")
end