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.
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
#dps ⇒ Object (readonly)
Returns the value of attribute dps.
323 324 325 |
# File 'lib/wowr/item.rb', line 323 def dps @dps end |
#max ⇒ Object (readonly)
Returns the value of attribute max.
323 324 325 |
# File 'lib/wowr/item.rb', line 323 def max @max end |
#min ⇒ Object (readonly)
Returns the value of attribute min.
323 324 325 |
# File 'lib/wowr/item.rb', line 323 def min @min end |
#speed ⇒ Object (readonly)
Returns the value of attribute speed.
323 324 325 |
# File 'lib/wowr/item.rb', line 323 def speed @speed end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
323 324 325 |
# File 'lib/wowr/item.rb', line 323 def type @type end |