Class: MetricFu::Reporter
- Inherits:
-
Object
- Object
- MetricFu::Reporter
- Defined in:
- lib/metric_fu/reporter.rb
Instance Method Summary collapse
- #display_results ⇒ Object
- #finish ⇒ Object
- #finish_metric(metric) ⇒ Object
-
#initialize(formatters = nil) ⇒ Reporter
constructor
A new instance of Reporter.
- #start ⇒ Object
- #start_metric(metric) ⇒ Object
Constructor Details
#initialize(formatters = nil) ⇒ Reporter
Returns a new instance of Reporter.
3 4 5 |
# File 'lib/metric_fu/reporter.rb', line 3 def initialize(formatters = nil) @formatters = Array(formatters) end |
Instance Method Details
#display_results ⇒ Object
25 26 27 |
# File 'lib/metric_fu/reporter.rb', line 25 def display_results notify :display_results end |
#finish ⇒ Object
11 12 13 |
# File 'lib/metric_fu/reporter.rb', line 11 def finish notify :finish end |
#finish_metric(metric) ⇒ Object
20 21 22 23 |
# File 'lib/metric_fu/reporter.rb', line 20 def finish_metric(metric) mf_log "** ENDING METRIC #{metric}" notify :finish_metric, metric end |
#start ⇒ Object
7 8 9 |
# File 'lib/metric_fu/reporter.rb', line 7 def start notify :start end |
#start_metric(metric) ⇒ Object
15 16 17 18 |
# File 'lib/metric_fu/reporter.rb', line 15 def start_metric(metric) mf_log "** STARTING METRIC #{metric}" notify :start_metric, metric end |