Class: Wowr::Classes::ItemDamageData
- Inherits:
-
Object
- Object
- Wowr::Classes::ItemDamageData
- Defined in:
- lib/wowr/item.rb
Instance Attribute Summary collapse
-
#dps ⇒ Object
readonly
Returns the value of attribute dps.
-
#max ⇒ Object
readonly
Returns the value of attribute max.
-
#min ⇒ Object
readonly
Returns the value of attribute min.
-
#speed ⇒ Object
readonly
Returns the value of attribute speed.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(elem) ⇒ ItemDamageData
constructor
A new instance of ItemDamageData.
Constructor Details
#initialize(elem) ⇒ ItemDamageData
Returns a new instance of ItemDamageData.
366 367 368 369 370 371 372 |
# File 'lib/wowr/item.rb', line 366 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 @dps = (elem%'dps').html.to_f end |
Instance Attribute Details
#dps ⇒ Object (readonly)
Returns the value of attribute dps.
364 365 366 |
# File 'lib/wowr/item.rb', line 364 def dps @dps end |
#max ⇒ Object (readonly)
Returns the value of attribute max.
364 365 366 |
# File 'lib/wowr/item.rb', line 364 def max @max end |
#min ⇒ Object (readonly)
Returns the value of attribute min.
364 365 366 |
# File 'lib/wowr/item.rb', line 364 def min @min end |
#speed ⇒ Object (readonly)
Returns the value of attribute speed.
364 365 366 |
# File 'lib/wowr/item.rb', line 364 def speed @speed end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
364 365 366 |
# File 'lib/wowr/item.rb', line 364 def type @type end |