Class: Wowr::Classes::WeaponDamage
- Inherits:
-
Object
- Object
- Wowr::Classes::WeaponDamage
- Defined in:
- lib/wowr/character.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.
-
#percent ⇒ Object
readonly
Returns the value of attribute percent.
-
#speed ⇒ Object
readonly
Returns the value of attribute speed.
Instance Method Summary collapse
-
#initialize(elem) ⇒ WeaponDamage
constructor
A new instance of WeaponDamage.
Constructor Details
#initialize(elem) ⇒ WeaponDamage
Returns a new instance of WeaponDamage.
464 465 466 467 468 469 470 |
# File 'lib/wowr/character.rb', line 464 def initialize(elem) @dps = elem[:dps].to_f @max = elem[:max].to_i @min = elem[:min].to_i @percent = elem[:percent].to_f @speed = elem[:speed].to_f end |
Instance Attribute Details
#dps ⇒ Object (readonly)
Returns the value of attribute dps.
462 463 464 |
# File 'lib/wowr/character.rb', line 462 def dps @dps end |
#max ⇒ Object (readonly)
Returns the value of attribute max.
462 463 464 |
# File 'lib/wowr/character.rb', line 462 def max @max end |
#min ⇒ Object (readonly)
Returns the value of attribute min.
462 463 464 |
# File 'lib/wowr/character.rb', line 462 def min @min end |
#percent ⇒ Object (readonly)
Returns the value of attribute percent.
462 463 464 |
# File 'lib/wowr/character.rb', line 462 def percent @percent end |
#speed ⇒ Object (readonly)
Returns the value of attribute speed.
462 463 464 |
# File 'lib/wowr/character.rb', line 462 def speed @speed end |