Sha256: 2b5c02d6f780d29c9f543355038205b7feb38076fbe8e342494f69d63418455a

Contents?: true

Size: 313 Bytes

Versions: 10

Compression:

Stored size: 313 Bytes

Contents

module JSONAPI
  module Consumer
    ResultSet.class_eval do
      def each_total
        results = pages.first
        loop do
          results.each do |result|
            yield(result)
          end
          results = results.pages.next
          break unless results
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
commercelayer-0.8.4 lib/jsonapi/consumer/decorators.rb
commercelayer-0.8.3 lib/jsonapi/consumer/decorators.rb
commercelayer-0.8.2 lib/jsonapi/consumer/decorators.rb
commercelayer-0.8.1 lib/jsonapi/consumer/decorators.rb
commercelayer-0.8.0 lib/jsonapi/consumer/decorators.rb
commercelayer-0.7.0 lib/jsonapi/consumer/decorators.rb
commercelayer-0.6.0 lib/jsonapi/consumer/decorators.rb
commercelayer-0.5.0 lib/jsonapi/consumer/decorators.rb
commercelayer-0.4.0 lib/jsonapi/consumer/decorators.rb
commercelayer-0.3.0 lib/jsonapi/consumer/decorators.rb