Method: LHS::Record::Batch::ClassMethods#find_each

Defined in:
lib/lhs/concerns/record/batch.rb

#find_each(options = {}) ⇒ Object

Process single entries fetched in batches



12
13
14
15
16
17
18
19
# File 'lib/lhs/concerns/record/batch.rb', line 12

def find_each(options = {})
  find_in_batches(options) do |records|
    records.each do |record|
      item = LHS::Item.new(record)
      yield new(LHS::Data.new(item, records._data, self))
    end
  end
end