Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/codetip/app/commander.rb

Instance Method Summary collapse

Instance Method Details

#blackObject



4
# File 'lib/codetip/app/commander.rb', line 4

def black;          "\033[30m#{self}\033[0m" end

#blueObject



7
# File 'lib/codetip/app/commander.rb', line 7

def blue;           "\033[34m#{self}\033[0m" end

#boldObject



9
# File 'lib/codetip/app/commander.rb', line 9

def bold;           "\033[1m#{self}\033[22m" end

#grayObject



8
# File 'lib/codetip/app/commander.rb', line 8

def gray;           "\033[37m#{self}\033[0m" end

#greenObject



6
# File 'lib/codetip/app/commander.rb', line 6

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

#highlightMessageObject



10
11
12
# File 'lib/codetip/app/commander.rb', line 10

def highlightMessage
	self.gsub(/(@\w+)/, '\1'.bold)
end

#redObject



5
# File 'lib/codetip/app/commander.rb', line 5

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