Class: D3api::EquippedItem
- Defined in:
- lib/d3api/item/equipped_item.rb
Constant Summary collapse
- EQUIPPED_ITEM_MAPPINGS =
{ :id => 'id', :name => 'name', :icon => 'icon', :display_color => 'displayColor', :tooltip_params => 'tooltipParams' }
Instance Attribute Summary collapse
-
#display_color ⇒ Object
Returns the value of attribute display_color.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#id ⇒ Object
Returns the value of attribute id.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
-
#tooltip_params ⇒ Object
Returns the value of attribute tooltip_params.
Instance Method Summary collapse
-
#initialize(array) ⇒ EquippedItem
constructor
A new instance of EquippedItem.
Methods included from Request
Methods included from Connection
Constructor Details
#initialize(array) ⇒ EquippedItem
Returns a new instance of EquippedItem.
14 15 16 17 18 19 20 |
# File 'lib/d3api/item/equipped_item.rb', line 14 def initialize(array) location = array[0] attributes = array[1] self.location = location set_method(attributes, EQUIPPED_ITEM_MAPPINGS) end |
Instance Attribute Details
#display_color ⇒ Object
Returns the value of attribute display_color.
11 12 13 |
# File 'lib/d3api/item/equipped_item.rb', line 11 def display_color @display_color end |
#icon ⇒ Object
Returns the value of attribute icon.
11 12 13 |
# File 'lib/d3api/item/equipped_item.rb', line 11 def icon @icon end |
#id ⇒ Object
Returns the value of attribute id.
11 12 13 |
# File 'lib/d3api/item/equipped_item.rb', line 11 def id @id end |
#location ⇒ Object
Returns the value of attribute location.
11 12 13 |
# File 'lib/d3api/item/equipped_item.rb', line 11 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
11 12 13 |
# File 'lib/d3api/item/equipped_item.rb', line 11 def name @name end |
#tooltip_params ⇒ Object
Returns the value of attribute tooltip_params.
11 12 13 |
# File 'lib/d3api/item/equipped_item.rb', line 11 def tooltip_params @tooltip_params end |