Module: Logging
- Included in:
- RoboScott
- Defined in:
- lib/roboscott.rb
Constant Summary collapse
- ESCAPES =
{ :green => "\033[32m", :yellow => "\033[33m", :red => "\033[31m", :reset => "\033[0m" }
Instance Method Summary collapse
Instance Method Details
#emit(opts = {}) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/roboscott.rb', line 15 def emit(opts={}) color = opts[:color] = opts[:message] print ESCAPES[color] print print ESCAPES[:reset] print "\n" end |
#error(message) ⇒ Object
11 12 13 |
# File 'lib/roboscott.rb', line 11 def error() emit(:message => , :color => :red) end |