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.
142 143 144 145 |
# File 'lib/eventful/api.rb', line 142 def initialize(response) super @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
139 140 141 |
# File 'lib/eventful/api.rb', line 139 def response @response end |
Instance Method Details
#to_s ⇒ Object
The error string returned by the API call.
148 149 150 |
# File 'lib/eventful/api.rb', line 148 def to_s "#{@response['string']}: #{@response['description']}" end |