Class: Reve::Classes::AssetContainer
Overview
A container or singleton (unpackaged thing). Attributes
-
item_id ( Fixnum ) - A CCP-specific ID for the Asset/AssetContainer
-
location_id ( Fixnum ) - The ID of the Station (or POS?) that the Asset/AssetContainer is at.
-
type_id ( Fixnum ) - Type ID of the Asset/AssetContainer. (Refer to CCP database dump invtypes)
-
quantity ( Fixnum ) - The number of Asset/AssetContainer at this
location_id
-
flag ( Fixnum ) - Inventory flag, refer to wiki.eve-dev.net/API_Inventory_Flags (See also KillLoss’s flag)
-
singleton ( Boolean ) - True if the Asset/AssetContainer is not packaged up.
-
assets ( [Asset] ) - A list of Asset objects that are contained in this AssetContainer.
See Also: Asset, Reve::API#corporate_assets_list, Reve::API#personal_assets_list
Instance Attribute Summary collapse
-
#assets ⇒ Object
Returns the value of attribute assets.
-
#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.
-
#quantity ⇒ Object
readonly
Returns the value of attribute quantity.
-
#rawQuantity ⇒ Object
readonly
Returns the value of attribute rawQuantity.
-
#singleton ⇒ Object
readonly
Returns the value of attribute singleton.
-
#type_id ⇒ Object
readonly
Returns the value of attribute type_id.
-
#xml_hash ⇒ Object
readonly
Returns the value of attribute xml_hash.
Instance Method Summary collapse
-
#initialize(elem) ⇒ AssetContainer
constructor
A new instance of AssetContainer.
Constructor Details
#initialize(elem) ⇒ AssetContainer
Returns a new instance of AssetContainer.
490 491 492 493 494 495 496 497 498 499 500 501 502 |
# File 'lib/reve/classes.rb', line 490 def initialize(elem) @item_id = elem['itemID'].to_i @location_id = elem['locationID'].to_i @type_id = elem['typeID'].to_i @quantity = elem['quantity'].to_i @flag = elem['flag'].to_i @singleton = elem['singleton'] == "1" @rawQuantity = elem['rawQuantity'].to_i @assets = [] # This ::Digest::SHA1 is a bit of custom code for Eve Metrics that will # probably find its way to all classes since it could prove handy. @xml_hash = ::Digest::SHA1.hexdigest elem.to_s.gsub(/\n|\r|\s/,'') end |
Instance Attribute Details
#assets ⇒ Object
Returns the value of attribute assets.
489 490 491 |
# File 'lib/reve/classes.rb', line 489 def assets @assets end |
#flag ⇒ Object (readonly)
Returns the value of attribute flag.
488 489 490 |
# File 'lib/reve/classes.rb', line 488 def flag @flag end |
#item_id ⇒ Object (readonly)
Returns the value of attribute item_id.
488 489 490 |
# File 'lib/reve/classes.rb', line 488 def item_id @item_id end |
#location_id ⇒ Object (readonly)
Returns the value of attribute location_id.
488 489 490 |
# File 'lib/reve/classes.rb', line 488 def location_id @location_id end |
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity.
488 489 490 |
# File 'lib/reve/classes.rb', line 488 def quantity @quantity end |
#rawQuantity ⇒ Object (readonly)
Returns the value of attribute rawQuantity.
488 489 490 |
# File 'lib/reve/classes.rb', line 488 def rawQuantity @rawQuantity end |
#singleton ⇒ Object (readonly)
Returns the value of attribute singleton.
488 489 490 |
# File 'lib/reve/classes.rb', line 488 def singleton @singleton end |
#type_id ⇒ Object (readonly)
Returns the value of attribute type_id.
488 489 490 |
# File 'lib/reve/classes.rb', line 488 def type_id @type_id end |
#xml_hash ⇒ Object (readonly)
Returns the value of attribute xml_hash.
488 489 490 |
# File 'lib/reve/classes.rb', line 488 def xml_hash @xml_hash end |