Exception: NameDotComApi::ConnectionError
- Inherits:
-
StandardError
- Object
- StandardError
- NameDotComApi::ConnectionError
- Defined in:
- lib/name_dot_com_api/connection.rb
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.
11 12 13 14 |
# File 'lib/name_dot_com_api/connection.rb', line 11 def initialize(response, = nil) @response = response @message = end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
9 10 11 |
# File 'lib/name_dot_com_api/connection.rb', line 9 def response @response end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/name_dot_com_api/connection.rb', line 16 def to_s "Failed with #{response.code} #{response. if response.respond_to?(:message)}" end |