Module: Rest::InternalClient::ResponseForException

Defined in:
lib/rest/wrappers/internal_client/internal/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



67
68
69
70
71
72
73
74
# File 'lib/rest/wrappers/internal_client/internal/exceptions.rb', line 67

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