Class: D3api::Item

Inherits:
BaseModel show all
Defined in:
lib/d3api/item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Request

#get

Methods included from Connection

#connection

Constructor Details

#initialize(region, item_hash) ⇒ Item

Returns a new instance of Item.



8
9
10
11
12
13
14
# File 'lib/d3api/item.rb', line 8

def initialize(region, item_hash)
  json_response = find(region, item_hash)

  values = super json_response

  set_method(values)
end

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



3
4
5
# File 'lib/d3api/item.rb', line 3

def attributes
  @attributes
end

#bonus_affixesObject

Returns the value of attribute bonus_affixes.



3
4
5
# File 'lib/d3api/item.rb', line 3

def bonus_affixes
  @bonus_affixes
end

#display_colorObject

Returns the value of attribute display_color.



3
4
5
# File 'lib/d3api/item.rb', line 3

def display_color
  @display_color
end

#iconObject

Returns the value of attribute icon.



3
4
5
# File 'lib/d3api/item.rb', line 3

def icon
  @icon
end

#item_levelObject

Returns the value of attribute item_level.



3
4
5
# File 'lib/d3api/item.rb', line 3

def item_level
  @item_level
end

#max_attacks_per_secondObject

Returns the value of attribute max_attacks_per_second.



3
4
5
# File 'lib/d3api/item.rb', line 3

def max_attacks_per_second
  @max_attacks_per_second
end

#max_dpsObject

Returns the value of attribute max_dps.



3
4
5
# File 'lib/d3api/item.rb', line 3

def max_dps
  @max_dps
end

#min_attacks_per_secondObject

Returns the value of attribute min_attacks_per_second.



3
4
5
# File 'lib/d3api/item.rb', line 3

def min_attacks_per_second
  @min_attacks_per_second
end

#min_dpsObject

Returns the value of attribute min_dps.



3
4
5
# File 'lib/d3api/item.rb', line 3

def min_dps
  @min_dps
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/d3api/item.rb', line 3

def name
  @name
end

#required_levelObject

Returns the value of attribute required_level.



3
4
5
# File 'lib/d3api/item.rb', line 3

def required_level
  @required_level
end

#salvageObject

Returns the value of attribute salvage.



3
4
5
# File 'lib/d3api/item.rb', line 3

def salvage
  @salvage
end

#socket_effectsObject

Returns the value of attribute socket_effects.



3
4
5
# File 'lib/d3api/item.rb', line 3

def socket_effects
  @socket_effects
end

#tooltip_paramsObject

Returns the value of attribute tooltip_params.



3
4
5
# File 'lib/d3api/item.rb', line 3

def tooltip_params
  @tooltip_params
end