lib/request_log_analyzer/aggregator/summarizer.rb in wvanbergen-request-log-analyzer-1.1.1 vs lib/request_log_analyzer/aggregator/summarizer.rb in wvanbergen-request-log-analyzer-1.1.2

- old
+ new

@@ -10,18 +10,22 @@ def initialize @trackers = [] end + def reset! + @trackers = [] + end + def method_missing(tracker_method, *args) track(tracker_method, args.first) end - def category(category_field, options = {}) + def frequency(category_field, options = {}) if category_field.kind_of?(Symbol) - track(:category, options.merge(:category => category_field)) + track(:frequency, options.merge(:category => category_field)) elsif category_field.kind_of?(Hash) - track(:category, category_field.merge(options)) + track(:frequency, category_field.merge(options)) end end def duration(duration_field, options = {}) if duration_field.kind_of?(Symbol)