class Eve::API::Response

Attributes

apiVersion[R]
api_version[R]
content[R]
rowsets[R]

Public Class Methods

new(xml, options = {}) click to toggle source
# File lib/eve/api/response.rb, line 13
def initialize(xml, options = {})
  @options = options
  @rowsets = []

  if xml.kind_of? String
    @xml = Nokogiri::XML(xml).root
  else
    @xml = xml
  end

  unless options[:process_xml] == false
    @api_version = @xml.attributes['version'].value
    parse_children @xml
    result = @xml.xpath("//result")[0]
    parse_children result if result
    all_fields << 'api_version'
    all_fields.delete 'result'
  end
end