Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/pastie-api/console.rb

Instance Method Summary collapse

Instance Method Details

#blueObject



6
# File 'lib/pastie-api/console.rb', line 6

def blue; colorize(self, "\e[1m\e[34m"); end

#colorize(text, color_code) ⇒ Object



10
# File 'lib/pastie-api/console.rb', line 10

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

#dark_blueObject



7
# File 'lib/pastie-api/console.rb', line 7

def dark_blue; colorize(self, "\e[34m"); end

#dark_greenObject



4
# File 'lib/pastie-api/console.rb', line 4

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

#greenObject



3
# File 'lib/pastie-api/console.rb', line 3

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

#magentaObject



9
# File 'lib/pastie-api/console.rb', line 9

def magenta; colorize(self, "\e[1m\e[36m"); end

#purpleObject



8
# File 'lib/pastie-api/console.rb', line 8

def purple; colorize(self, "\e[1m\e[35m"); end

#redObject



2
# File 'lib/pastie-api/console.rb', line 2

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

#yellowObject



5
# File 'lib/pastie-api/console.rb', line 5

def yellow; colorize(self, "\e[1m\e[33m"); end