Class: ActiveResource::ConnectionError
- Inherits:
-
Object
- Object
- ActiveResource::ConnectionError
- Defined in:
- lib/esp/extensions/active_resource/formats/json_api_format.rb
Instance Method Summary collapse
-
#initialize(response) ⇒ ConnectionError
constructor
A new instance of ConnectionError.
Constructor Details
#initialize(response) ⇒ ConnectionError
Returns a new instance of ConnectionError.
5 6 7 8 9 10 11 12 |
# File 'lib/esp/extensions/active_resource/formats/json_api_format.rb', line 5 def initialize(response) @response = if response.respond_to?(:response) = decoded_errors(response.response.body) Struct.new(:body, :code, :message).new(response.response.body, response.code, ) else response end end |