Class: ActiveMetric::TrueCount

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



142
143
144
# File 'lib/active_metric/statistics/defaults.rb', line 142

def calculate(measurement)
  self.value +=1 if measurement.send(self.property)
end