Class: OAI::Resumable::ResumptionWrapper
- Inherits:
-
Object
- Object
- OAI::Resumable::ResumptionWrapper
- Includes:
- Enumerable
- Defined in:
- lib/oai/client/resumable.rb
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(response) ⇒ ResumptionWrapper
constructor
A new instance of ResumptionWrapper.
Constructor Details
#initialize(response) ⇒ ResumptionWrapper
Returns a new instance of ResumptionWrapper.
7 8 9 10 |
# File 'lib/oai/client/resumable.rb', line 7 def initialize(response) @response = response @resumption_block = response.resumption_block end |
Instance Method Details
#each(&block) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/oai/client/resumable.rb', line 12 def each(&block) yield_from_response &block while resumable? @response = @resumption_block.call @response yield_from_response &block end end |