Class: D3api::EquippedItem

Inherits:
BaseModel show all
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

Instance Method Summary collapse

Methods included from Request

#get

Methods included from Connection

#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_colorObject

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

#iconObject

Returns the value of attribute icon.



11
12
13
# File 'lib/d3api/item/equipped_item.rb', line 11

def icon
  @icon
end

#idObject

Returns the value of attribute id.



11
12
13
# File 'lib/d3api/item/equipped_item.rb', line 11

def id
  @id
end

#locationObject

Returns the value of attribute location.



11
12
13
# File 'lib/d3api/item/equipped_item.rb', line 11

def location
  @location
end

#nameObject

Returns the value of attribute name.



11
12
13
# File 'lib/d3api/item/equipped_item.rb', line 11

def name
  @name
end

#tooltip_paramsObject

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