Class: EveApp::XmlApi::Classes::Asset

Inherits:
Base
  • Object
show all
Defined in:
lib/eve_app/xml_api/classes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ Asset

Returns a new instance of Asset.



122
123
124
125
126
127
128
129
130
131
132
# File 'lib/eve_app/xml_api/classes.rb', line 122

def initialize(elem)
  @container = false
  @parent = nil
  @item_id = elem['itemID'].to_i
  @type_id = elem['typeID'].to_i
  @location_id = elem['locationID'].to_i
  @quantity = elem['quantity'].to_i
  @flag = elem['flag'].to_i
  @repacked = elem['singleton'].to_i
  @raw_quantity = elem['rawQuantity'].to_i
end

Instance Attribute Details

#containerObject

Returns the value of attribute container.



119
120
121
# File 'lib/eve_app/xml_api/classes.rb', line 119

def container
  @container
end

#flagObject (readonly)

Returns the value of attribute flag.



120
121
122
# File 'lib/eve_app/xml_api/classes.rb', line 120

def flag
  @flag
end

#item_idObject (readonly)

Returns the value of attribute item_id.



120
121
122
# File 'lib/eve_app/xml_api/classes.rb', line 120

def item_id
  @item_id
end

#location_idObject (readonly)

Returns the value of attribute location_id.



120
121
122
# File 'lib/eve_app/xml_api/classes.rb', line 120

def location_id
  @location_id
end

#parentObject

Returns the value of attribute parent.



119
120
121
# File 'lib/eve_app/xml_api/classes.rb', line 119

def parent
  @parent
end

#quantityObject (readonly)

Returns the value of attribute quantity.



120
121
122
# File 'lib/eve_app/xml_api/classes.rb', line 120

def quantity
  @quantity
end

#raw_quantityObject (readonly)

Returns the value of attribute raw_quantity.



120
121
122
# File 'lib/eve_app/xml_api/classes.rb', line 120

def raw_quantity
  @raw_quantity
end

#repackedObject (readonly)

Returns the value of attribute repacked.



120
121
122
# File 'lib/eve_app/xml_api/classes.rb', line 120

def repacked
  @repacked
end

#type_idObject (readonly)

Returns the value of attribute type_id.



120
121
122
# File 'lib/eve_app/xml_api/classes.rb', line 120

def type_id
  @type_id
end

Instance Method Details

#container?Boolean

Returns:

  • (Boolean)


134
135
136
# File 'lib/eve_app/xml_api/classes.rb', line 134

def container?
  !!container
end

#parent?Boolean

Returns:

  • (Boolean)


138
139
140
# File 'lib/eve_app/xml_api/classes.rb', line 138

def parent?
  !!parent
end