Module: ByStar

Defined in:
lib/by_star.rb,
lib/by_star/vanilla.rb,
lib/by_star/version.rb,
lib/by_star/neighbours.rb,
lib/by_star/calculations.rb,
lib/by_star/calculations/sum.rb,
lib/by_star/calculations/count.rb,
lib/by_star/range_calculations.rb

Defined Under Namespace

Modules: Calculations, ClassMethods, InstanceMethods, Neighbours, RangeCalculations, Vanilla Classes: MonthNotFound, ParseError

Constant Summary collapse

VERSION =
"1.0.1"

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'lib/by_star.rb', line 16

def self.included(base)
  base.extend ClassMethods
  base.send(:include, InstanceMethods)
  base.class_eval do
    def self.by_star_field(value=nil)
      @by_star_field ||= value
      @by_star_field || "#{self.table_name}.created_at"
    end
  end
end