Class: Wowr::Classes::ItemDamageData

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ ItemDamageData

Returns a new instance of ItemDamageData.



325
326
327
328
329
330
331
# File 'lib/wowr/item.rb', line 325

def initialize(elem)
	@type 	= (elem%'damage'%'type').html.to_i
	@min 		= (elem%'damage'%'min').html.to_i
	@max 		= (elem%'damage'%'max').html.to_i
	@speed 	= (elem%'speed').html.to_i	if (elem%'speed')
	@dps 		= (elem%'dps').html.to_f		if (elem%'dps')
end

Instance Attribute Details

#dpsObject (readonly)

Returns the value of attribute dps.



323
324
325
# File 'lib/wowr/item.rb', line 323

def dps
  @dps
end

#maxObject (readonly)

Returns the value of attribute max.



323
324
325
# File 'lib/wowr/item.rb', line 323

def max
  @max
end

#minObject (readonly)

Returns the value of attribute min.



323
324
325
# File 'lib/wowr/item.rb', line 323

def min
  @min
end

#speedObject (readonly)

Returns the value of attribute speed.



323
324
325
# File 'lib/wowr/item.rb', line 323

def speed
  @speed
end

#typeObject (readonly)

Returns the value of attribute type.



323
324
325
# File 'lib/wowr/item.rb', line 323

def type
  @type
end