Exception: Eventful::APIError

Inherits:
Error
  • Object
show all
Defined in:
lib/eventful/api.rb

Overview

An error that may also include the YAML response from the server

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#responseObject (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_sObject

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