Class: Rapa::Responses::MultipleResourcesResponse
- Inherits:
-
BaseResponse
- Object
- BaseResponse
- Rapa::Responses::MultipleResourcesResponse
- Includes:
- Enumerable
- Defined in:
- lib/rapa/responses/multiple_resources_response.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from BaseResponse
#body, #headers, #initialize, #status
Constructor Details
This class inherits a constructor from Rapa::Responses::BaseResponse
Instance Method Details
#each(&block) ⇒ Object
Note:
Implementation for Enumerable
7 8 9 |
# File 'lib/rapa/responses/multiple_resources_response.rb', line 7 def each(&block) resources.each(&block) end |
#resources ⇒ Array<Rapa::Resources::ItemResource>
12 13 14 15 16 |
# File 'lib/rapa/responses/multiple_resources_response.rb', line 12 def resources sources.map do |source| resource_class.new(source) end end |