Class: String

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

Instance Method Summary collapse

Instance Method Details

#blueObject



6
# File 'lib/chkdfront/cli_operations.rb', line 6

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

#boldObject



13
# File 'lib/chkdfront/cli_operations.rb', line 13

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

#colorize(text, color_code) ⇒ Object



15
# File 'lib/chkdfront/cli_operations.rb', line 15

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

#cyanObject



10
# File 'lib/chkdfront/cli_operations.rb', line 10

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

#dark_blueObject



7
# File 'lib/chkdfront/cli_operations.rb', line 7

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

#dark_cyanObject



11
# File 'lib/chkdfront/cli_operations.rb', line 11

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

#dark_greenObject



4
# File 'lib/chkdfront/cli_operations.rb', line 4

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

#dark_purpleObject



9
# File 'lib/chkdfront/cli_operations.rb', line 9

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

#errorObject



14
# File 'lib/chkdfront/cli_operations.rb', line 14

def error; colorize(self, "\n[" + "".red + "] "); end

#greenObject



3
# File 'lib/chkdfront/cli_operations.rb', line 3

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

#pureObject



12
# File 'lib/chkdfront/cli_operations.rb', line 12

def pure; colorize(self, "\e[0m\e[28m"); end

#purpleObject



8
# File 'lib/chkdfront/cli_operations.rb', line 8

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

#redObject



2
# File 'lib/chkdfront/cli_operations.rb', line 2

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

#yellowObject



5
# File 'lib/chkdfront/cli_operations.rb', line 5

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