Module: Niceql::StringColorize
- Defined in:
- lib/niceql.rb
Class Method Summary collapse
- .colorize_comment(comment) ⇒ Object
- .colorize_err(err) ⇒ Object
- .colorize_keyword(str) ⇒ Object
- .colorize_str(str) ⇒ Object
Class Method Details
.colorize_comment(comment) ⇒ Object
25 26 27 28 |
# File 'lib/niceql.rb', line 25 def colorize_comment(comment) # bright black bold ANSI color "\e[0;90;1;49m#{comment}\e[0m" end |
.colorize_err(err) ⇒ Object
20 21 22 23 |
# File 'lib/niceql.rb', line 20 def colorize_err(err) # red ANSI color "\e[0;31;49m#{err}\e[0m" end |
.colorize_keyword(str) ⇒ Object
10 11 12 13 |
# File 'lib/niceql.rb', line 10 def colorize_keyword(str) # yellow ANSI color "\e[0;33;49m#{str}\e[0m" end |
.colorize_str(str) ⇒ Object
15 16 17 18 |
# File 'lib/niceql.rb', line 15 def colorize_str(str) # cyan ANSI color "\e[0;36;49m#{str}\e[0m" end |