Module: Niceql::StringColorize

Defined in:
lib/niceql.rb

Class Method Summary collapse

Class Method Details

.colorize_comment(comment) ⇒ Object



24
25
26
27
# File 'lib/niceql.rb', line 24

def self.colorize_comment(comment)
  # bright black bold ANSI color
  "\e[0;90;1;49m#{comment}\e[0m"
end

.colorize_err(err) ⇒ Object



19
20
21
22
# File 'lib/niceql.rb', line 19

def self.colorize_err(err)
  # red ANSI color
  "\e[0;31;49m#{err}\e[0m"
end

.colorize_keyword(str) ⇒ Object



9
10
11
12
# File 'lib/niceql.rb', line 9

def self.colorize_keyword(str)
  # yellow ANSI color
  "\e[0;33;49m#{str}\e[0m"
end

.colorize_str(str) ⇒ Object



14
15
16
17
# File 'lib/niceql.rb', line 14

def self.colorize_str(str)
  # cyan ANSI color
  "\e[0;36;49m#{str}\e[0m"
end