Class: EveApp::XmlApi::Classes::Asset
- Defined in:
- lib/eve_app/xml_api/classes.rb
Instance Attribute Summary collapse
-
#container ⇒ Object
Returns the value of attribute container.
-
#flag ⇒ Object
readonly
Returns the value of attribute flag.
-
#item_id ⇒ Object
readonly
Returns the value of attribute item_id.
-
#location_id ⇒ Object
readonly
Returns the value of attribute location_id.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#quantity ⇒ Object
readonly
Returns the value of attribute quantity.
-
#raw_quantity ⇒ Object
readonly
Returns the value of attribute raw_quantity.
-
#repacked ⇒ Object
readonly
Returns the value of attribute repacked.
-
#type_id ⇒ Object
readonly
Returns the value of attribute type_id.
Instance Method Summary collapse
- #container? ⇒ Boolean
-
#initialize(elem) ⇒ Asset
constructor
A new instance of Asset.
- #parent? ⇒ Boolean
Constructor Details
#initialize(elem) ⇒ Asset
Returns a new instance of Asset.
122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/eve_app/xml_api/classes.rb', line 122 def initialize(elem) @container = false @parent = nil @item_id = elem['itemID'].to_i @type_id = elem['typeID'].to_i @location_id = elem['locationID'].to_i @quantity = elem['quantity'].to_i @flag = elem['flag'].to_i @repacked = elem['singleton'].to_i @raw_quantity = elem['rawQuantity'].to_i end |
Instance Attribute Details
#container ⇒ Object
Returns the value of attribute container.
119 120 121 |
# File 'lib/eve_app/xml_api/classes.rb', line 119 def container @container end |
#flag ⇒ Object (readonly)
Returns the value of attribute flag.
120 121 122 |
# File 'lib/eve_app/xml_api/classes.rb', line 120 def flag @flag end |
#item_id ⇒ Object (readonly)
Returns the value of attribute item_id.
120 121 122 |
# File 'lib/eve_app/xml_api/classes.rb', line 120 def item_id @item_id end |
#location_id ⇒ Object (readonly)
Returns the value of attribute location_id.
120 121 122 |
# File 'lib/eve_app/xml_api/classes.rb', line 120 def location_id @location_id end |
#parent ⇒ Object
Returns the value of attribute parent.
119 120 121 |
# File 'lib/eve_app/xml_api/classes.rb', line 119 def parent @parent end |
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity.
120 121 122 |
# File 'lib/eve_app/xml_api/classes.rb', line 120 def quantity @quantity end |
#raw_quantity ⇒ Object (readonly)
Returns the value of attribute raw_quantity.
120 121 122 |
# File 'lib/eve_app/xml_api/classes.rb', line 120 def raw_quantity @raw_quantity end |
#repacked ⇒ Object (readonly)
Returns the value of attribute repacked.
120 121 122 |
# File 'lib/eve_app/xml_api/classes.rb', line 120 def repacked @repacked end |
#type_id ⇒ Object (readonly)
Returns the value of attribute type_id.
120 121 122 |
# File 'lib/eve_app/xml_api/classes.rb', line 120 def type_id @type_id end |
Instance Method Details
#container? ⇒ Boolean
134 135 136 |
# File 'lib/eve_app/xml_api/classes.rb', line 134 def container? !!container end |
#parent? ⇒ Boolean
138 139 140 |
# File 'lib/eve_app/xml_api/classes.rb', line 138 def parent? !!parent end |