Class: Wowr::Classes::Resistance
- Inherits:
-
Object
- Object
- Wowr::Classes::Resistance
- Defined in:
- lib/wowr/character.rb
Instance Attribute Summary collapse
-
#pet_bonus ⇒ Object
readonly
Returns the value of attribute pet_bonus.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(elem) ⇒ Resistance
constructor
A new instance of Resistance.
Constructor Details
#initialize(elem) ⇒ Resistance
Returns a new instance of Resistance.
649 650 651 652 |
# File 'lib/wowr/character.rb', line 649 def initialize(elem) @value = elem[:value].to_i @pet_bonus = elem[:petBonus].to_i == -1 ? nil : elem[:petBonus].to_i end |
Instance Attribute Details
#pet_bonus ⇒ Object (readonly)
Returns the value of attribute pet_bonus.
647 648 649 |
# File 'lib/wowr/character.rb', line 647 def pet_bonus @pet_bonus end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
647 648 649 |
# File 'lib/wowr/character.rb', line 647 def value @value end |