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.10.0 lib/json_api_client/result_set.rb
json_api_client-1.9.0 lib/json_api_client/result_set.rb
json_api_client-1.8.0 lib/json_api_client/result_set.rb
json_api_client-1.7.0 lib/json_api_client/result_set.rb
json_api_client-1.6.4 lib/json_api_client/result_set.rb
json_api_client-1.6.3 lib/json_api_client/result_set.rb
json_api_client-1.6.2 lib/json_api_client/result_set.rb
json_api_client-1.6.1 lib/json_api_client/result_set.rb
json_api_client-1.6.0 lib/json_api_client/result_set.rb
json_api_client-1.5.3 lib/json_api_client/result_set.rb
json_api_client-1.5.2 lib/json_api_client/result_set.rb
json_api_client-1.5.1 lib/json_api_client/result_set.rb
json_api_client-1.5.0 lib/json_api_client/result_set.rb
json_api_client-1.4.0 lib/json_api_client/result_set.rb
json_api_client-1.3.0 lib/json_api_client/result_set.rb
json_api_client-1.2.0 lib/json_api_client/result_set.rb
json_api_client-1.1.1 lib/json_api_client/result_set.rb
json_api_client-1.1.0 lib/json_api_client/result_set.rb
json_api_client-1.0.2 lib/json_api_client/result_set.rb
json_api_client-1.0.1 lib/json_api_client/result_set.rb