Class: Rapa::Responses::MultipleResourcesResponse

Inherits:
BaseResponse
  • Object
show all
Includes:
Enumerable
Defined in:
lib/rapa/responses/multiple_resources_response.rb

Direct Known Subclasses

ListItemsResponse, SearchItemsResponse

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

#resourcesArray<Rapa::Resources::ItemResource>

Returns:



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