lib/acfs/resource/query_methods.rb in acfs-1.1.0 vs lib/acfs/resource/query_methods.rb in acfs-1.1.1

- old
+ new

@@ -191,13 +191,16 @@ # # @param opts [Hash] Options passed to {#each_page}. # # @yield [item] Callback that will be invoked for each item. # @yieldparam item [self] Resource. + # @yieldparam collection [Acfs::Collection] Collection. # - def each_item(opts = {}, &block) + def each_item(opts = {}) each_page(opts) do |collection| - collection.each(&block) + collection.each do |item| + yield item, collection + end end end private