Sha256: 8e3160fa5a16bde3fc0df76eb0b8a0b3c4c00e639a859aa41d5dbbdcaa632456

Contents?: true

Size: 633 Bytes

Versions: 47

Compression:

Stored size: 633 Bytes

Contents

require 'forwardable'

module JsonApiClient
  class ResultSet < Array
    extend Forwardable

    attr_accessor :errors,
                  :record_class,
                  :meta,
                  :pages,
                  :uri,
                  :links,
                  :implementation,
                  :relationships,
                  :included

    # pagination methods are handled by the paginator
    def_delegators :pages, :total_pages, :total_entries, :total_count, :offset, :per_page, :current_page, :limit_value, :next_page, :previous_page, :out_of_bounds?

    def has_errors?
      errors.present?
    end

  end
end

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
json_api_client-1.23.0 lib/json_api_client/result_set.rb
json_api_client-1.22.0 lib/json_api_client/result_set.rb
json_api_client-1.21.1 lib/json_api_client/result_set.rb
json_api_client-1.21.0 lib/json_api_client/result_set.rb
json_api_client-1.20.0 lib/json_api_client/result_set.rb
json_api_client-1.19.0 lib/json_api_client/result_set.rb
carwow-json_api_client-1.19.0 lib/json_api_client/result_set.rb
json_api_client-1.18.0 lib/json_api_client/result_set.rb
json_api_client-1.17.1 lib/json_api_client/result_set.rb
json_api_client-1.17.0 lib/json_api_client/result_set.rb
json_api_client-1.16.1 lib/json_api_client/result_set.rb
json_api_client-1.16.0 lib/json_api_client/result_set.rb
json_api_client-1.15.0 lib/json_api_client/result_set.rb
json_api_client-1.14.1 lib/json_api_client/result_set.rb
json_api_client-1.14.0 lib/json_api_client/result_set.rb
json_api_client-1.13.0 lib/json_api_client/result_set.rb
json_api_client-1.12.2 lib/json_api_client/result_set.rb
json_api_client-1.12.1 lib/json_api_client/result_set.rb
json_api_client-1.12.0 lib/json_api_client/result_set.rb
json_api_client-1.11.0 lib/json_api_client/result_set.rb