Exception: Spreedly::UnexpectedResponseError
- Defined in:
- lib/spreedly/error.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ UnexpectedResponseError
constructor
A new instance of UnexpectedResponseError.
- #to_s ⇒ Object
Constructor Details
#initialize(response) ⇒ UnexpectedResponseError
Returns a new instance of UnexpectedResponseError.
39 40 41 |
# File 'lib/spreedly/error.rb', line 39 def initialize(response) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
37 38 39 |
# File 'lib/spreedly/error.rb', line 37 def response @response end |
Instance Method Details
#to_s ⇒ Object
43 44 45 |
# File 'lib/spreedly/error.rb', line 43 def to_s "Failed with #{response.code} #{response. if response.respond_to?(:message)}" end |