Class: Wowr::Classes::ItemSetData
- Inherits:
-
Object
- Object
- Wowr::Classes::ItemSetData
- Defined in:
- lib/wowr/item.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#name ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute name.
-
#set_bonuses ⇒ Object
readonly
Returns the value of attribute set_bonuses.
Instance Method Summary collapse
-
#initialize(elem) ⇒ ItemSetData
constructor
A new instance of ItemSetData.
Constructor Details
#initialize(elem) ⇒ ItemSetData
Returns a new instance of ItemSetData.
326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/wowr/item.rb', line 326 def initialize(elem) @name = elem[:name] @items = [] (elem/:item).each do |item| @items << item[:name] end @set_bonuses = [] (elem/:setBonus).each do |bonus| @set_bonuses << ItemSetBonus.new(bonus) end end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
323 324 325 |
# File 'lib/wowr/item.rb', line 323 def items @items end |
#name ⇒ Object (readonly) Also known as: to_s
Returns the value of attribute name.
323 324 325 |
# File 'lib/wowr/item.rb', line 323 def name @name end |
#set_bonuses ⇒ Object (readonly)
Returns the value of attribute set_bonuses.
323 324 325 |
# File 'lib/wowr/item.rb', line 323 def set_bonuses @set_bonuses end |