Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/stagecoach/config.rb

Instance Method Summary collapse

Instance Method Details

#colorize(text, color_code) ⇒ Object



173
# File 'lib/stagecoach/config.rb', line 173

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

#greenObject



172
# File 'lib/stagecoach/config.rb', line 172

def green; colorize(self, "\e[32m"); end

#redObject



171
# File 'lib/stagecoach/config.rb', line 171

def red; colorize(self, "\e[1m\e[31m"); end