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
-
#flag ⇒ Object
readonly
Returns the value of attribute flag.
-
#item_id ⇒ Object
readonly
Returns the value of attribute item_id.
-
#quantity ⇒ Object
readonly
Returns the value of attribute quantity.
-
#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) ⇒ Asset
constructor
:nodoc:.
Constructor Details
#initialize(elem) ⇒ Asset
: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
#flag ⇒ Object (readonly)
Returns the value of attribute flag.
471 472 473 |
# File 'lib/reve/classes.rb', line 471 def flag @flag end |
#item_id ⇒ Object (readonly)
Returns the value of attribute item_id.
471 472 473 |
# File 'lib/reve/classes.rb', line 471 def item_id @item_id end |
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity.
471 472 473 |
# File 'lib/reve/classes.rb', line 471 def quantity @quantity end |
#singleton ⇒ Object (readonly)
Returns the value of attribute singleton.
471 472 473 |
# File 'lib/reve/classes.rb', line 471 def singleton @singleton end |
#type_id ⇒ Object (readonly)
Returns the value of attribute type_id.
471 472 473 |
# File 'lib/reve/classes.rb', line 471 def type_id @type_id end |
#xml_hash ⇒ Object (readonly)
Returns the value of attribute xml_hash.
471 472 473 |
# File 'lib/reve/classes.rb', line 471 def xml_hash @xml_hash end |