lib/rapa/responses/base_response.rb in rapa-0.5.7 vs lib/rapa/responses/base_response.rb in rapa-0.6.0

- old
+ new

@@ -1,34 +1,20 @@ module Rapa module Responses class BaseResponse - include ::Enumerable - # @param faraday_response [Faraday::Response] def initialize(faraday_response) @faraday_response = faraday_response end # @return [String] def body faraday_response.body end - # @note Implementation for Enumerable - def each(&block) - resources.each(&block) - end - # @return [Faraday::Utils::Headers] def headers faraday_response.headers - end - - # @return [Array<Rapa::Resources::ItemResource>] - def resources - sources.map do |source| - resource_class.new(source) - end end # @return [Integer] def status faraday_response.status