Class: Wowr::Classes::GuildBank

Inherits:
Guild
  • Object
show all
Defined in:
lib/wowr/guild_bank.rb

Overview

def get_login_status name = xml%‘loginStatus’ return name == “” ? nil : name end

Direct Known Subclasses

GuildBankContents, GuildBankLog

Instance Attribute Summary collapse

Attributes inherited from Guild

#name, #realm, #url

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ GuildBank

Returns a new instance of GuildBank.



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/wowr/guild_bank.rb', line 18

def initialize(elem)
	super(elem%'guildKey')
	
	@motd = (elem%'guildMessages')[:motd]
	@info = (elem%'guildMessages')[:info]
	@info.gsub("
", "\n")
	
	@bags = []
	(elem%'bags'/:bag).each do |bag|
		@bags[bag[:id].to_i] = GuildBankBag.new(bag)
	end
	
	@ranks = []
	(elem%'guildRanks'/:rank).each do |rank|
		@ranks[rank[:id].to_i] = rank[:name]
	end
end

Instance Attribute Details

#bagsObject (readonly)

Returns the value of attribute bags.



16
17
18
# File 'lib/wowr/guild_bank.rb', line 16

def bags
  @bags
end

#infoObject (readonly)

Returns the value of attribute info.



16
17
18
# File 'lib/wowr/guild_bank.rb', line 16

def info
  @info
end

#moneyObject (readonly)

Returns the value of attribute money.



16
17
18
# File 'lib/wowr/guild_bank.rb', line 16

def money
  @money
end

#motdObject (readonly)

Returns the value of attribute motd.



16
17
18
# File 'lib/wowr/guild_bank.rb', line 16

def motd
  @motd
end

#ranksObject (readonly)

Returns the value of attribute ranks.



16
17
18
# File 'lib/wowr/guild_bank.rb', line 16

def ranks
  @ranks
end