Class: Foxtrot::Response::ErrorResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/foxtrot/response.rb

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.

Raises:

  • (@exception)


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

Returns:

  • (Boolean)


46
47
48
# File 'lib/foxtrot/response.rb', line 46

def complete?
  true
end

#get_resultObject



54
55
56
# File 'lib/foxtrot/response.rb', line 54

def get_result
  nil
end

#poll!Object

Raises:

  • (@exception)


50
51
52
# File 'lib/foxtrot/response.rb', line 50

def poll!
  raise @exception
end

#to_sObject



58
59
60
# File 'lib/foxtrot/response.rb', line 58

def to_s
  "ErrorResponse (#{@message})"
end