Class: Wowr::Classes::Defense
- Inherits:
-
Object
- Object
- Wowr::Classes::Defense
- Defined in:
- lib/wowr/character.rb
Instance Attribute Summary collapse
-
#decrease_percent ⇒ Object
readonly
Returns the value of attribute decrease_percent.
-
#increase_percent ⇒ Object
readonly
Returns the value of attribute increase_percent.
-
#plus_defense ⇒ Object
readonly
Returns the value of attribute plus_defense.
-
#rating ⇒ Object
readonly
Returns the value of attribute rating.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(elem) ⇒ Defense
constructor
A new instance of Defense.
Constructor Details
#initialize(elem) ⇒ Defense
Returns a new instance of Defense.
616 617 618 619 620 621 622 |
# File 'lib/wowr/character.rb', line 616 def initialize(elem) @value = elem[:value].to_i @increase_percent = elem[:increasePercent].to_f @decrease_percent = elem[:decreasePercent].to_f @plus_defense = elem[:plusDefense].to_i @rating = elem[:rating].to_i end |
Instance Attribute Details
#decrease_percent ⇒ Object (readonly)
Returns the value of attribute decrease_percent.
614 615 616 |
# File 'lib/wowr/character.rb', line 614 def decrease_percent @decrease_percent end |
#increase_percent ⇒ Object (readonly)
Returns the value of attribute increase_percent.
614 615 616 |
# File 'lib/wowr/character.rb', line 614 def increase_percent @increase_percent end |
#plus_defense ⇒ Object (readonly)
Returns the value of attribute plus_defense.
614 615 616 |
# File 'lib/wowr/character.rb', line 614 def plus_defense @plus_defense end |
#rating ⇒ Object (readonly)
Returns the value of attribute rating.
614 615 616 |
# File 'lib/wowr/character.rb', line 614 def @rating end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
614 615 616 |
# File 'lib/wowr/character.rb', line 614 def value @value end |