class LogfileInterval::Aggregator::LastValue
Public Class Methods
new(options = {})
click to toggle source
Calls superclass method
LogfileInterval::Aggregator::Base::new
# File lib/logfile_interval/aggregator/last_value.rb, line 4 def initialize(options = {}) super(options) @val = {} end
Public Instance Methods
add(value, group_by = nil)
click to toggle source
# File lib/logfile_interval/aggregator/last_value.rb, line 9 def add(value, group_by = nil) if !@val[key(group_by)] @val[key(group_by)] = value end @size.increment(key(group_by)) end