Class: Wowr::Classes::WeaponPower
- Inherits:
-
Object
- Object
- Wowr::Classes::WeaponPower
- Defined in:
- lib/wowr/character.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#effective ⇒ Object
readonly
Returns the value of attribute effective.
-
#increased_dps ⇒ Object
readonly
Returns the value of attribute increased_dps.
-
#pet_attack ⇒ Object
readonly
Returns the value of attribute pet_attack.
-
#pet_spell ⇒ Object
readonly
Returns the value of attribute pet_spell.
Instance Method Summary collapse
-
#initialize(elem) ⇒ WeaponPower
constructor
A new instance of WeaponPower.
Constructor Details
#initialize(elem) ⇒ WeaponPower
Returns a new instance of WeaponPower.
486 487 488 489 490 491 492 |
# File 'lib/wowr/character.rb', line 486 def initialize(elem) @base = elem[:base].to_i @haste_rating = elem[:effective].to_i @increased_dps = elem[:increasedDps].to_f @pet_attack = (elem[:petAttack].to_f == -1 ? nil : elem[:petAttack].to_f) @pet_spell = (elem[:petSpell].to_f == -1 ? nil : elem[:petSpell].to_f) end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
484 485 486 |
# File 'lib/wowr/character.rb', line 484 def base @base end |
#effective ⇒ Object (readonly)
Returns the value of attribute effective.
484 485 486 |
# File 'lib/wowr/character.rb', line 484 def effective @effective end |
#increased_dps ⇒ Object (readonly)
Returns the value of attribute increased_dps.
484 485 486 |
# File 'lib/wowr/character.rb', line 484 def increased_dps @increased_dps end |
#pet_attack ⇒ Object (readonly)
Returns the value of attribute pet_attack.
484 485 486 |
# File 'lib/wowr/character.rb', line 484 def pet_attack @pet_attack end |
#pet_spell ⇒ Object (readonly)
Returns the value of attribute pet_spell.
484 485 486 |
# File 'lib/wowr/character.rb', line 484 def pet_spell @pet_spell end |