Class: Wowr::Classes::WeaponPower

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#baseObject (readonly)

Returns the value of attribute base.



484
485
486
# File 'lib/wowr/character.rb', line 484

def base
  @base
end

#effectiveObject (readonly)

Returns the value of attribute effective.



484
485
486
# File 'lib/wowr/character.rb', line 484

def effective
  @effective
end

#increased_dpsObject (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_attackObject (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_spellObject (readonly)

Returns the value of attribute pet_spell.



484
485
486
# File 'lib/wowr/character.rb', line 484

def pet_spell
  @pet_spell
end