Sha256: 2cc17a0e194410ea281ad7bedcb4c545b399828e071b731d804a52bbc0fc8798
Contents?: true
Size: 681 Bytes
Versions: 9
Compression:
Stored size: 681 Bytes
Contents
module MetricFu class Reporter def initialize(formatters = nil) @formatters = Array(formatters) end def start notify :start end def finish notify :finish end def start_metric(metric) mf_log "** STARTING METRIC #{metric}" notify :start_metric, metric end def finish_metric(metric) mf_log "** ENDING METRIC #{metric}" notify :finish_metric, metric end def display_results notify :display_results end protected def notify(event, *args) @formatters.each do |formatter| formatter.send(event, *args) if formatter.respond_to?(event) end end end end
Version data entries
9 entries across 9 versions & 3 rubygems