Class: Wowr::Classes::GuildBankContents
- Defined in:
- lib/wowr/guild_bank.rb
Overview
bags now contain references to the items Items can be accessed from items (within Wowr::Classes::GuildBankContents) Or by their individual bags using bag.items
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Attributes inherited from GuildBank
#bags, #info, #money, #motd, #ranks
Attributes inherited from Guild
Instance Method Summary collapse
-
#initialize(elem, api = nil) ⇒ GuildBankContents
constructor
A new instance of GuildBankContents.
Constructor Details
#initialize(elem, api = nil) ⇒ GuildBankContents
Returns a new instance of GuildBankContents.
43 44 45 46 47 48 49 50 51 |
# File 'lib/wowr/guild_bank.rb', line 43 def initialize(elem, api = nil) super(elem) @money = Money.new((elem%'guildBank')[:money].to_i) @items = [] (elem%'items'/:item).each do |item| @items << GuildBankItem.new(item, bags, api) end end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
41 42 43 |
# File 'lib/wowr/guild_bank.rb', line 41 def items @items end |