Module: RestClient::ResponseForException

Defined in:
lib/restclient/exceptions.rb

Overview

Compatibility : make the Response act like a Net::HTTPResponse when needed

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(symbol, *args) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/restclient/exceptions.rb', line 5

def method_missing symbol, *args
  if net_http_res.respond_to? symbol
    warn "[warning] The response contained in an RestClient::Exception is now a RestClient::Response instead of a Net::HTTPResponse, please update your code"
    net_http_res.send symbol, *args
  else
    super
  end
end