Class: D3api::HeroStats

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

Constant Summary collapse

STAT_MAPPINGS =
{
  :life => 'life',
  :damage => 'damage',
  :attack_speed => 'attackSpeed',
  :armor => 'armor',
  :strength => 'strength',
  :dexterity => 'dexterity',
  :vitality => 'vitality',
  :intelligence => 'intelligence',
  :physical_resist => 'physicalResist',
  :fire_resist => 'fireResist',
  :cold_resist => 'coldResist',
  :lightning_resist => 'lightningResist',
  :poison_resist => 'poisonResist',
  :arcane_resist => 'arcaneResist',
  :crit_damage => 'critDamage',
  :block_chance => 'blockChance',
  :block_amount_min => 'blockAmountMin',
  :block_amount_max => 'blockAmountMax',
  :damage_increase => 'damageIncrease',
  :crit_chance => 'critChance',
  :damage_reduction => 'damageReduction',
  :thorns => 'thorns',
  :life_steal => 'lifeSteal',
  :life_per_kill => 'lifePerKill',
  :gold_find => 'goldFind',
  :magic_find => 'magicFind',
  :life_on_hit => 'lifeOnHit',
  :primary_resource => 'primaryResource',
  :secondary_resource => 'secondaryResource'
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Request

#get

Methods included from Connection

#connection

Constructor Details

#initialize(stat_values) ⇒ HeroStats

Returns a new instance of HeroStats.



44
45
46
# File 'lib/d3api/hero/stats.rb', line 44

def initialize(stat_values)
  set_method(stat_values, STAT_MAPPINGS)
end

Instance Attribute Details

#arcane_resistObject

Returns the value of attribute arcane_resist.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def arcane_resist
  @arcane_resist
end

#armorObject

Returns the value of attribute armor.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def armor
  @armor
end

#attack_speedObject

Returns the value of attribute attack_speed.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def attack_speed
  @attack_speed
end

#block_amount_maxObject

Returns the value of attribute block_amount_max.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def block_amount_max
  @block_amount_max
end

#block_amount_minObject

Returns the value of attribute block_amount_min.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def block_amount_min
  @block_amount_min
end

#block_chanceObject

Returns the value of attribute block_chance.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def block_chance
  @block_chance
end

#cold_resistObject

Returns the value of attribute cold_resist.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def cold_resist
  @cold_resist
end

#crit_chanceObject

Returns the value of attribute crit_chance.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def crit_chance
  @crit_chance
end

#crit_damageObject

Returns the value of attribute crit_damage.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def crit_damage
  @crit_damage
end

#damageObject

Returns the value of attribute damage.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def damage
  @damage
end

#damage_increaseObject

Returns the value of attribute damage_increase.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def damage_increase
  @damage_increase
end

#damage_reductionObject

Returns the value of attribute damage_reduction.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def damage_reduction
  @damage_reduction
end

#dexterityObject

Returns the value of attribute dexterity.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def dexterity
  @dexterity
end

#fire_resistObject

Returns the value of attribute fire_resist.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def fire_resist
  @fire_resist
end

#gold_findObject

Returns the value of attribute gold_find.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def gold_find
  @gold_find
end

#intelligenceObject

Returns the value of attribute intelligence.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def intelligence
  @intelligence
end

#lifeObject

Returns the value of attribute life.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def life
  @life
end

#life_on_hitObject

Returns the value of attribute life_on_hit.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def life_on_hit
  @life_on_hit
end

#life_per_killObject

Returns the value of attribute life_per_kill.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def life_per_kill
  @life_per_kill
end

#life_stealObject

Returns the value of attribute life_steal.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def life_steal
  @life_steal
end

#lightning_resistObject

Returns the value of attribute lightning_resist.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def lightning_resist
  @lightning_resist
end

#magic_findObject

Returns the value of attribute magic_find.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def magic_find
  @magic_find
end

#physical_resistObject

Returns the value of attribute physical_resist.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def physical_resist
  @physical_resist
end

#poison_resistObject

Returns the value of attribute poison_resist.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def poison_resist
  @poison_resist
end

#primary_resourceObject

Returns the value of attribute primary_resource.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def primary_resource
  @primary_resource
end

#secondary_resourceObject

Returns the value of attribute secondary_resource.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def secondary_resource
  @secondary_resource
end

#strengthObject

Returns the value of attribute strength.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def strength
  @strength
end

#thornsObject

Returns the value of attribute thorns.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def thorns
  @thorns
end

#vitalityObject

Returns the value of attribute vitality.



35
36
37
# File 'lib/d3api/hero/stats.rb', line 35

def vitality
  @vitality
end