Class: Wowr::Classes::PetBonus
- Inherits:
-
Object
- Object
- Wowr::Classes::PetBonus
- Defined in:
- lib/wowr/character.rb
Instance Attribute Summary collapse
-
#attack ⇒ Object
readonly
Returns the value of attribute attack.
-
#damage ⇒ Object
readonly
Returns the value of attribute damage.
-
#from_Type ⇒ Object
readonly
Returns the value of attribute from_Type.
Instance Method Summary collapse
-
#initialize(elem) ⇒ PetBonus
constructor
A new instance of PetBonus.
Constructor Details
#initialize(elem) ⇒ PetBonus
Returns a new instance of PetBonus.
580 581 582 583 584 |
# File 'lib/wowr/character.rb', line 580 def initialize(elem) @attack = elem[:attack].to_i == -1 ? nil : elem[:attack].to_i @damage = elem[:damage].to_i == -1 ? nil : elem[:damage].to_i @from_type = elem[:fromType] if elem[:fromType] end |
Instance Attribute Details
#attack ⇒ Object (readonly)
Returns the value of attribute attack.
578 579 580 |
# File 'lib/wowr/character.rb', line 578 def attack @attack end |
#damage ⇒ Object (readonly)
Returns the value of attribute damage.
578 579 580 |
# File 'lib/wowr/character.rb', line 578 def damage @damage end |
#from_Type ⇒ Object (readonly)
Returns the value of attribute from_Type.
578 579 580 |
# File 'lib/wowr/character.rb', line 578 def from_Type @from_Type end |