Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record_samplooper.rb

Class Method Summary collapse

Class Method Details

.sample(count = 1) ⇒ Object



121
122
123
# File 'lib/active_record_samplooper.rb', line 121

def sample(count = 1)
  count > 1 ? count.times.map { do_sampling } : do_sampling
end

.samplerObject



126
127
128
# File 'lib/active_record_samplooper.rb', line 126

def sampler
  ActiveRecordSamplooper.(self)
end