Class: ActiveMetric::Max

Inherits:
Stat
  • Object
show all
Defined in:
lib/active_metric/statistics/defaults.rb

Instance Method Summary collapse

Methods inherited from Stat

access_name, #access_name, approximation, class_for, #complete, create_custom_stat, #initialize, #property_from, #subject

Constructor Details

This class inherits a constructor from ActiveMetric::Stat

Instance Method Details

#calculate(measurement) ⇒ Object



15
16
17
# File 'lib/active_metric/statistics/defaults.rb', line 15

def calculate(measurement)
  self.value = [self.value, measurement.send(self.property)].max
end