module AggtiveRecord::EggScopes::Collation::CountBy::ClassMethods

Public: convenience for by_:time_period and count self is a ActiveRecord scope

Public Instance Methods

count_by(time_period) click to toggle source
# File lib/aggtive_record/egg_scopes/collation/count_by.rb, line 11
def count_by(time_period)
  span_foo = "by_#{time_period}"
  self.send(span_foo).count
end