lib/soaspec/exchange.rb in soaspec-0.1.17 vs lib/soaspec/exchange.rb in soaspec-0.1.18

- old
+ new

@@ -146,12 +146,15 @@ # Returns response object from Api. Will make the request if not made and then cache it for later on # @example For SOAP it will be a Savon response # response.body (body of response as Hash) # response.header (head of response as Hash) + # @example For REST it will be a RestClient::Response def response Soaspec.last_exchange = self @response ||= make_request + @response.define_singleton_method(:exchange) { Soaspec.last_exchange } unless @response.respond_to?(:exchange) + @response end alias call response # Request of API call. Either intended request or actual request \ No newline at end of file