Method: Restforce::Collection#each

Defined in:
lib/restforce/collection.rb

#eachObject

Yield each value on each page.


15
16
17
18
19
20
21
22
23
# File 'lib/restforce/collection.rb', line 15

def each(&)
  @raw_page['records'].each { |record| yield Restforce::Mash.build(record, @client) }

  np = next_page
  while np
    np.current_page.each(&)
    np = np.next_page
  end
end