Class: EveApp::XmlApi::Calls::ErrorResponse
- Defined in:
- lib/eve_app/xml_api/calls.rb
Instance Attribute Summary collapse
-
#call ⇒ Object
readonly
Returns the value of attribute call.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Attributes inherited from Base
Instance Method Summary collapse
- #error? ⇒ Boolean
-
#initialize(exception, call = nil, params = {}) ⇒ ErrorResponse
constructor
A new instance of ErrorResponse.
- #title ⇒ Object
- #to_s ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(exception, call = nil, params = {}) ⇒ ErrorResponse
Returns a new instance of ErrorResponse.
171 172 173 174 175 |
# File 'lib/eve_app/xml_api/calls.rb', line 171 def initialize(exception, call=nil, params={}) @exception = exception @call = call @params = params end |
Instance Attribute Details
#call ⇒ Object (readonly)
Returns the value of attribute call.
169 170 171 |
# File 'lib/eve_app/xml_api/calls.rb', line 169 def call @call end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
169 170 171 |
# File 'lib/eve_app/xml_api/calls.rb', line 169 def exception @exception end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
169 170 171 |
# File 'lib/eve_app/xml_api/calls.rb', line 169 def params @params end |
Instance Method Details
#error? ⇒ Boolean
177 178 179 |
# File 'lib/eve_app/xml_api/calls.rb', line 177 def error? true end |
#title ⇒ Object
181 182 183 |
# File 'lib/eve_app/xml_api/calls.rb', line 181 def title exception.http_body.scan(/<title>(.+?)<\/title>/).flatten[0] end |
#to_s ⇒ Object
185 186 187 188 189 190 191 192 193 |
# File 'lib/eve_app/xml_api/calls.rb', line 185 def to_s puts "================================" puts "API Error: #{exception.class}" puts "title: #{title}" puts "body: #{exception.http_body}" puts "call: #{call}" puts "params: #{params.inspect}" puts "================================" end |