Exception: ActiveResource::ConnectionError
- Inherits:
-
StandardError
- Object
- StandardError
- ActiveResource::ConnectionError
- Defined in:
- lib/active_resource/exceptions.rb
Overview
:nodoc:
Direct Known Subclasses
ClientError, Redirection, SSLError, ServerError, TimeoutError
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response, message = nil) ⇒ ConnectionError
constructor
A new instance of ConnectionError.
- #to_s ⇒ Object
Constructor Details
#initialize(response, message = nil) ⇒ ConnectionError
Returns a new instance of ConnectionError.
7 8 9 10 |
# File 'lib/active_resource/exceptions.rb', line 7 def initialize(response, = nil) @response = response @message = end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/active_resource/exceptions.rb', line 5 def response @response end |
Instance Method Details
#to_s ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/active_resource/exceptions.rb', line 12 def to_s return @message if @message = +"Failed." << " Response code = #{response.code}." if response.respond_to?(:code) << " Response message = #{response.}." if response.respond_to?(:message) end |