Exception: Eventful::APIError
- Defined in:
- lib/eventful/api.rb
Overview
An error that may also include the YAML response from the server
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ APIError
constructor
Creates a new exception.
-
#to_s ⇒ Object
The error string returned by the API call.
Constructor Details
#initialize(response) ⇒ APIError
Creates a new exception.
199 200 201 202 |
# File 'lib/eventful/api.rb', line 199 def initialize(response) super @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
196 197 198 |
# File 'lib/eventful/api.rb', line 196 def response @response end |
Instance Method Details
#to_s ⇒ Object
The error string returned by the API call.
205 206 207 |
# File 'lib/eventful/api.rb', line 205 def to_s "#{@response['string']}: #{@response['description']}" end |