Class: EveApp::XmlApi::Classes::CharacterSheet
- Defined in:
- lib/eve_app/xml_api/classes.rb
Instance Attribute Summary collapse
-
#corporation_id ⇒ Object
readonly
Returns the value of attribute corporation_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(xml) ⇒ CharacterSheet
constructor
A new instance of CharacterSheet.
Constructor Details
#initialize(xml) ⇒ CharacterSheet
Returns a new instance of CharacterSheet.
40 41 42 43 44 |
# File 'lib/eve_app/xml_api/classes.rb', line 40 def initialize(xml) @id = xml.search('//result/characterID[1]').text.to_i @name = xml.search('//result/name[1]').text @corporation_id = xml.search('//result/corporationID[1]').text.to_i end |
Instance Attribute Details
#corporation_id ⇒ Object (readonly)
Returns the value of attribute corporation_id.
38 39 40 |
# File 'lib/eve_app/xml_api/classes.rb', line 38 def corporation_id @corporation_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
38 39 40 |
# File 'lib/eve_app/xml_api/classes.rb', line 38 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
38 39 40 |
# File 'lib/eve_app/xml_api/classes.rb', line 38 def name @name end |