Sha256: 0609e50feddf31d0ccbe5661f1353e08573a9fe90a75e7e589d06e72947b44b0

Contents?: true

Size: 521 Bytes

Versions: 1

Compression:

Stored size: 521 Bytes

Contents

require 'forwardable'

module JsonApiClient
  class ResultSet < Array
    extend Forwardable

    attr_accessor :errors,
                  :record_class,
                  :meta,
                  :pages,
                  :uri,
                  :links

    # pagination methods are handled by the paginator
    def_delegators :pages, :total_pages, :total_entries, :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

1 entries across 1 versions & 1 rubygems

Version Path
json_api_client-1.0.0.beta lib/json_api_client/result_set.rb