Module: WeightedRandom::InstanceMethods

Defined in:
lib/weighted_random.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



19
20
21
22
23
# File 'lib/weighted_random.rb', line 19

def self.included base
  base.instance_eval do
    before_create :set_cumulative_weight_of_new_record
  end
end