Class: Wowr::Classes::Strength
- Defined in:
- lib/wowr/character.rb
Instance Attribute Summary collapse
-
#attack ⇒ Object
readonly
Returns the value of attribute attack.
-
#block ⇒ Object
readonly
Returns the value of attribute block.
Attributes inherited from BaseStat
Instance Method Summary collapse
-
#initialize(elem) ⇒ Strength
constructor
A new instance of Strength.
Constructor Details
#initialize(elem) ⇒ Strength
Returns a new instance of Strength.
344 345 346 347 348 349 |
# File 'lib/wowr/character.rb', line 344 def initialize(elem) @base = elem['base'].to_i @effective = elem['effective'].to_i @attack = elem['attack'].to_i @block = elem['block'].to_i == -1 ? nil : elem['block'].to_i end |
Instance Attribute Details
#attack ⇒ Object (readonly)
Returns the value of attribute attack.
343 344 345 |
# File 'lib/wowr/character.rb', line 343 def attack @attack end |
#block ⇒ Object (readonly)
Returns the value of attribute block.
343 344 345 |
# File 'lib/wowr/character.rb', line 343 def block @block end |