Class: OAI::Provider::PartialResult

Inherits:
Object
  • Object
show all
Defined in:
lib/oai/provider/partial_result.rb

Overview

OAI::Provider::PartialResult

PartialResult is used for returning a set/page of results from a model that supports resumption tokens. It should contain and array of records, and a resumption token for getting the next set/page.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(records, token = nil) ⇒ PartialResult

Returns a new instance of PartialResult.



11
12
13
14
# File 'lib/oai/provider/partial_result.rb', line 11

def initialize(records, token = nil)
  @records = records
  @token = token
end

Instance Attribute Details

#recordsObject (readonly)

Returns the value of attribute records.



9
10
11
# File 'lib/oai/provider/partial_result.rb', line 9

def records
  @records
end

#tokenObject (readonly)

Returns the value of attribute token.



9
10
11
# File 'lib/oai/provider/partial_result.rb', line 9

def token
  @token
end