Method: Exchange#response
- Defined in:
- lib/soaspec/exchange/exchange.rb
#response ⇒ RestClient::Response, Savon::Response
Returns response object from Api. Will make the request if not made and then cache it for later on
98 99 100 101 102 103 104 105 106 |
# File 'lib/soaspec/exchange/exchange.rb', line 98 def response require 'forwardable' Soaspec.last_exchange = self @response ||= make_request @response.define_singleton_method(:exchange) { Soaspec.last_exchange } unless @response.respond_to?(:exchange) @response.extend Forwardable @response.delegate i[value_from_path values_from_path] => :exchange @response end |