Class: Wowr::Classes::Armor
- Defined in:
- lib/wowr/character.rb,
lib/wowr/character.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#effective ⇒ Object
readonly
Returns the value of attribute effective.
-
#percent ⇒ Object
readonly
Returns the value of attribute percent.
-
#pet_bonus ⇒ Object
readonly
Returns the value of attribute pet_bonus.
Instance Method Summary collapse
-
#initialize(elem) ⇒ Armor
constructor
A new instance of Armor.
Constructor Details
#initialize(elem) ⇒ Armor
Returns a new instance of Armor.
384 385 386 387 388 389 |
# File 'lib/wowr/character.rb', line 384 def initialize(elem) @base = elem[:base].to_i @effective = elem[:effective].to_i @percent = elem[:percent].to_f @pet_bonus = elem[:petBonus].to_i == -1 ? nil : elem[:petBonus].to_i end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
603 604 605 |
# File 'lib/wowr/character.rb', line 603 def base @base end |
#effective ⇒ Object (readonly)
Returns the value of attribute effective.
603 604 605 |
# File 'lib/wowr/character.rb', line 603 def effective @effective end |
#percent ⇒ Object (readonly)
Returns the value of attribute percent.
383 384 385 |
# File 'lib/wowr/character.rb', line 383 def percent @percent end |
#pet_bonus ⇒ Object (readonly)
Returns the value of attribute pet_bonus.
383 384 385 |
# File 'lib/wowr/character.rb', line 383 def pet_bonus @pet_bonus end |