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.
332 333 334 335 336 337 |
# File 'lib/wowr/character.rb', line 332 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.
331 332 333 |
# File 'lib/wowr/character.rb', line 331 def attack @attack end |
#block ⇒ Object (readonly)
Returns the value of attribute block.
331 332 333 |
# File 'lib/wowr/character.rb', line 331 def block @block end |