Class: Reve::Classes::Asset

Inherits:
Object show all
Defined in:
lib/reve/classes.rb

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

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ Asset

:nodoc:



431
432
433
434
435
436
437
# File 'lib/reve/classes.rb', line 431

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
end

Instance Attribute Details

#flagObject (readonly)

Returns the value of attribute flag.



430
431
432
# File 'lib/reve/classes.rb', line 430

def flag
  @flag
end

#item_idObject (readonly)

Returns the value of attribute item_id.



430
431
432
# File 'lib/reve/classes.rb', line 430

def item_id
  @item_id
end

#quantityObject (readonly)

Returns the value of attribute quantity.



430
431
432
# File 'lib/reve/classes.rb', line 430

def quantity
  @quantity
end

#singletonObject (readonly)

Returns the value of attribute singleton.



430
431
432
# File 'lib/reve/classes.rb', line 430

def singleton
  @singleton
end

#type_idObject (readonly)

Returns the value of attribute type_id.



430
431
432
# File 'lib/reve/classes.rb', line 430

def type_id
  @type_id
end