Class: Wowr::Classes::GuildBankContents

Inherits:
GuildBank show all
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

Attributes inherited from GuildBank

#bags, #info, #money, #motd, #ranks

Attributes inherited from Guild

#name, #realm, #url

Instance Method Summary collapse

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

#itemsObject (readonly)

Returns the value of attribute items.



41
42
43
# File 'lib/wowr/guild_bank.rb', line 41

def items
  @items
end