Class: Wowr::Classes::Stamina
- Defined in:
- lib/wowr/character.rb
Instance Attribute Summary collapse
-
#health ⇒ Object
readonly
Returns the value of attribute health.
-
#pet_bonus ⇒ Object
readonly
Returns the value of attribute pet_bonus.
Attributes inherited from BaseStat
Instance Method Summary collapse
-
#initialize(elem) ⇒ Stamina
constructor
A new instance of Stamina.
Constructor Details
#initialize(elem) ⇒ Stamina
Returns a new instance of Stamina.
353 354 355 356 357 358 |
# File 'lib/wowr/character.rb', line 353 def initialize(elem) @base = elem[:base].to_i @effective = elem[:effective].to_i @health = elem[:health].to_i @pet_bonus = elem[:petBonus].to_i == -1 ? nil : elem[:petBonus].to_i end |
Instance Attribute Details
#health ⇒ Object (readonly)
Returns the value of attribute health.
352 353 354 |
# File 'lib/wowr/character.rb', line 352 def health @health end |
#pet_bonus ⇒ Object (readonly)
Returns the value of attribute pet_bonus.
352 353 354 |
# File 'lib/wowr/character.rb', line 352 def pet_bonus @pet_bonus end |