Class: Foxtrot::Response::ErrorResponse
Instance Method Summary
collapse
Methods inherited from Response
#poll_and_block!, response_for
Constructor Details
#initialize(endpoint, resp, api_instance) ⇒ ErrorResponse
Returns a new instance of ErrorResponse.
39
40
41
42
43
44
|
# File 'lib/foxtrot/response.rb', line 39
def initialize(endpoint, resp, api_instance)
super
@message = resp['message']
@exception = Foxtrot::Errors::APIResponseError.new @message
raise @exception
end
|
Instance Method Details
#complete? ⇒ Boolean
46
47
48
|
# File 'lib/foxtrot/response.rb', line 46
def complete?
true
end
|
#get_result ⇒ Object
54
55
56
|
# File 'lib/foxtrot/response.rb', line 54
def get_result
nil
end
|
#poll! ⇒ Object
50
51
52
|
# File 'lib/foxtrot/response.rb', line 50
def poll!
raise @exception
end
|
#to_s ⇒ Object
58
59
60
|
# File 'lib/foxtrot/response.rb', line 58
def to_s
"ErrorResponse (#{@message})"
end
|