Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/helpers/colorize.rb

Overview

This is an extension of the Ruby String class. Example usage: puts “This message is red”.red From stackoverflow.com/a/11482430/3038677

Defined Under Namespace

Modules: Colors

Instance Method Summary collapse

Instance Method Details

#greenObject



18
19
20
# File 'lib/helpers/colorize.rb', line 18

def green
  colorize(Colors::GREEN)
end

#magentaObject



26
27
28
# File 'lib/helpers/colorize.rb', line 26

def magenta
  colorize(Colors::MAGENTA)
end

#redObject



14
15
16
# File 'lib/helpers/colorize.rb', line 14

def red
  colorize(Colors::RED)
end

#yellowObject



22
23
24
# File 'lib/helpers/colorize.rb', line 22

def yellow
  colorize(Colors::YELLOW)
end