Class: String

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

Overview

monkey patch in some color effects string methods

Instance Method Summary collapse

Instance Method Details

#cyanObject



6
# File 'lib/retrospec.rb', line 6

def cyan;           "\033[36m#{self}\033[0m" end

#fatalObject



9
# File 'lib/retrospec.rb', line 9

def fatal;          red                      end

#greenObject



5
# File 'lib/retrospec.rb', line 5

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

#infoObject



10
# File 'lib/retrospec.rb', line 10

def info;           green                    end

#redObject



4
# File 'lib/retrospec.rb', line 4

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

#warningObject



8
# File 'lib/retrospec.rb', line 8

def warning;        yellow                   end

#yellowObject



7
# File 'lib/retrospec.rb', line 7

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