Class: Dotum::Logger
- Inherits:
-
Object
- Object
- Dotum::Logger
- Includes:
- Util::ANSIColors
- Defined in:
- lib/dotum/logger.rb
Constant Summary collapse
- INDENT =
" "
Instance Method Summary collapse
Methods included from Util::ANSIColors
Instance Method Details
#finish_rule(rule, status, reason) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/dotum/logger.rb', line 16 def finish_rule(rule, status, reason) = "#{rule_line(rule)} - #{status.inspect} - #{reason.inspect}" if @last_rule == rule delta = (Time.now - @last_rule_start) * 1000.0 += " (%.2fms)" % delta print "\r" else print "\n\n" end print end |
#start_rule(rule) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/dotum/logger.rb', line 8 def start_rule(rule) @last_rule = rule @last_rule_start = Time.now print "\n" print rule_line(rule) end |