Class: Reve::Classes::AssetContainer

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

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

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ AssetContainer

Returns a new instance of AssetContainer.



411
412
413
414
415
416
417
418
419
# File 'lib/reve/classes.rb', line 411

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"
  @assets = []
end

Instance Attribute Details

#assetsObject

Returns the value of attribute assets.



410
411
412
# File 'lib/reve/classes.rb', line 410

def assets
  @assets
end

#flagObject (readonly)

Returns the value of attribute flag.



409
410
411
# File 'lib/reve/classes.rb', line 409

def flag
  @flag
end

#item_idObject (readonly)

Returns the value of attribute item_id.



409
410
411
# File 'lib/reve/classes.rb', line 409

def item_id
  @item_id
end

#location_idObject (readonly)

Returns the value of attribute location_id.



409
410
411
# File 'lib/reve/classes.rb', line 409

def location_id
  @location_id
end

#quantityObject (readonly)

Returns the value of attribute quantity.



409
410
411
# File 'lib/reve/classes.rb', line 409

def quantity
  @quantity
end

#singletonObject (readonly)

Returns the value of attribute singleton.



409
410
411
# File 'lib/reve/classes.rb', line 409

def singleton
  @singleton
end

#type_idObject (readonly)

Returns the value of attribute type_id.



409
410
411
# File 'lib/reve/classes.rb', line 409

def type_id
  @type_id
end