Class: Cyclid::Cli::Formatter::Terminal
- Defined in:
- lib/cyclid/cli/formatter.rb
Overview
Output with XTerm compatible color
Class Method Summary collapse
- .ask(question) ⇒ Object
- .colorize(title, *args) ⇒ Object
- .error(title, *args) ⇒ Object
- .warning(title, *args) ⇒ Object
Methods inherited from Base
Class Method Details
.ask(question) ⇒ Object
59 60 61 |
# File 'lib/cyclid/cli/formatter.rb', line 59 def ask(question) print "#{question}: ".colorize(:red) end |
.colorize(title, *args) ⇒ Object
47 48 49 |
# File 'lib/cyclid/cli/formatter.rb', line 47 def colorize(title, *args) puts_with_color(:cyan, title, args) end |
.error(title, *args) ⇒ Object
55 56 57 |
# File 'lib/cyclid/cli/formatter.rb', line 55 def error(title, *args) puts_with_color(:red, title, args) end |
.warning(title, *args) ⇒ Object
51 52 53 |
# File 'lib/cyclid/cli/formatter.rb', line 51 def warning(title, *args) puts_with_color(:yellow, title, args) end |