Class: Wowr::Classes::WeaponPower

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ WeaponPower

Returns a new instance of WeaponPower.



422
423
424
425
426
427
428
# File 'lib/wowr/classes.rb', line 422

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.



420
421
422
# File 'lib/wowr/classes.rb', line 420

def base
  @base
end

#effectiveObject (readonly)

Returns the value of attribute effective.



420
421
422
# File 'lib/wowr/classes.rb', line 420

def effective
  @effective
end

#increased_dpsObject (readonly)

Returns the value of attribute increased_dps.



420
421
422
# File 'lib/wowr/classes.rb', line 420

def increased_dps
  @increased_dps
end

#pet_attackObject (readonly)

Returns the value of attribute pet_attack.



420
421
422
# File 'lib/wowr/classes.rb', line 420

def pet_attack
  @pet_attack
end

#pet_spellObject (readonly)

Returns the value of attribute pet_spell.



420
421
422
# File 'lib/wowr/classes.rb', line 420

def pet_spell
  @pet_spell
end