Class: Reve::Classes::Asset
Overview
An item contained within an AssetContainer (ship, or container) Attributes
-
item_id ( Fixnum ) - A CCP-specific ID for the Asset/AssetContainer
-
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)
See Also: AssetContainer, Reve::API#corporate_assets_list, Reve::API#personal_assets_list
Instance Attribute Summary (collapse)
-
- (Object) flag
readonly
Returns the value of attribute flag.
-
- (Object) item_id
readonly
Returns the value of attribute item_id.
-
- (Object) quantity
readonly
Returns the value of attribute quantity.
-
- (Object) singleton
readonly
Returns the value of attribute singleton.
-
- (Object) type_id
readonly
Returns the value of attribute type_id.
-
- (Object) xml_hash
readonly
Returns the value of attribute xml_hash.
Instance Method Summary (collapse)
-
- (Asset) initialize(elem)
constructor
:nodoc:.
Constructor Details
- (Asset) initialize(elem)
:nodoc:
472 473 474 475 476 477 478 479 480 481 |
# File 'lib/reve/classes.rb', line 472 def initialize(elem) #:nodoc: @item_id = elem['itemID'].to_i @type_id = elem['typeID'].to_i @quantity = elem['quantity'].to_i @flag = elem['flag'].to_i @singleton = elem['singleton'].to_i # 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
- (Object) flag (readonly)
Returns the value of attribute flag
471 472 473 |
# File 'lib/reve/classes.rb', line 471 def flag @flag end |
- (Object) item_id (readonly)
Returns the value of attribute item_id
471 472 473 |
# File 'lib/reve/classes.rb', line 471 def item_id @item_id end |
- (Object) quantity (readonly)
Returns the value of attribute quantity
471 472 473 |
# File 'lib/reve/classes.rb', line 471 def quantity @quantity end |
- (Object) singleton (readonly)
Returns the value of attribute singleton
471 472 473 |
# File 'lib/reve/classes.rb', line 471 def singleton @singleton end |
- (Object) type_id (readonly)
Returns the value of attribute type_id
471 472 473 |
# File 'lib/reve/classes.rb', line 471 def type_id @type_id end |
- (Object) xml_hash (readonly)
Returns the value of attribute xml_hash
471 472 473 |
# File 'lib/reve/classes.rb', line 471 def xml_hash @xml_hash end |