Class: Wowr::Classes::PetBonus

Inherits:
Object
  • Object
show all
Defined in:
lib/wowr/character.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attackObject (readonly)

Returns the value of attribute attack.



578
579
580
# File 'lib/wowr/character.rb', line 578

def attack
  @attack
end

#damageObject (readonly)

Returns the value of attribute damage.



578
579
580
# File 'lib/wowr/character.rb', line 578

def damage
  @damage
end

#from_TypeObject (readonly)

Returns the value of attribute from_Type.



578
579
580
# File 'lib/wowr/character.rb', line 578

def from_Type
  @from_Type
end