Class: EveApp::XmlApi::Classes::CorporationSheet

Inherits:
Base
  • Object
show all
Defined in:
lib/eve_app/xml_api/classes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml) ⇒ CorporationSheet

Returns a new instance of CorporationSheet.



50
51
52
53
54
# File 'lib/eve_app/xml_api/classes.rb', line 50

def initialize(xml)
  @id          = xml.search('//result/corporationID[1]').text.to_i
  @name        = xml.search('//result/corporationName[1]').text
  @alliance_id = xml.search('//result/allianceID[1]').text.to_i
end

Instance Attribute Details

#alliance_idObject (readonly)

Returns the value of attribute alliance_id.



48
49
50
# File 'lib/eve_app/xml_api/classes.rb', line 48

def alliance_id
  @alliance_id
end

#idObject (readonly)

Returns the value of attribute id.



48
49
50
# File 'lib/eve_app/xml_api/classes.rb', line 48

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



48
49
50
# File 'lib/eve_app/xml_api/classes.rb', line 48

def name
  @name
end