Module: CLIApp::Util::Color

Defined in:
lib/cliapp.rb

Class Method Summary collapse

Class Method Details

.decolorize(s) ⇒ Object



399
400
401
# File 'lib/cliapp.rb', line 399

def decolorize(s)
  return s.gsub(/\e\[.*?m/, '')
end

.error(s) ⇒ Object



398
# File 'lib/cliapp.rb', line 398

def error(s)  ; return "\e[31m#{s}\e[0m" ; end

.header(s) ⇒ Object



397
# File 'lib/cliapp.rb', line 397

def header(s) ; return "\e[36m#{s}\e[0m" ; end

.strong(s) ⇒ Object



395
# File 'lib/cliapp.rb', line 395

def strong(s) ; return "\e[1m#{s}\e[0m"  ; end

.weak(s) ⇒ Object



396
# File 'lib/cliapp.rb', line 396

def weak(s)   ; return "\e[2m#{s}\e[0m"  ; end