Class: Wowr::Classes::GuildBank
Overview
def get_login_status name = xml%‘loginStatus’ return name == “” ? nil : name end
Direct Known Subclasses
Instance Attribute Summary collapse
-
#bags ⇒ Object
readonly
Returns the value of attribute bags.
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#money ⇒ Object
readonly
Returns the value of attribute money.
-
#motd ⇒ Object
readonly
Returns the value of attribute motd.
-
#ranks ⇒ Object
readonly
Returns the value of attribute ranks.
Attributes inherited from Guild
Instance Method Summary collapse
-
#initialize(elem) ⇒ GuildBank
constructor
A new instance of GuildBank.
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
#bags ⇒ Object (readonly)
Returns the value of attribute bags.
16 17 18 |
# File 'lib/wowr/guild_bank.rb', line 16 def bags @bags end |
#info ⇒ Object (readonly)
Returns the value of attribute info.
16 17 18 |
# File 'lib/wowr/guild_bank.rb', line 16 def info @info end |
#money ⇒ Object (readonly)
Returns the value of attribute money.
16 17 18 |
# File 'lib/wowr/guild_bank.rb', line 16 def money @money end |
#motd ⇒ Object (readonly)
Returns the value of attribute motd.
16 17 18 |
# File 'lib/wowr/guild_bank.rb', line 16 def motd @motd end |
#ranks ⇒ Object (readonly)
Returns the value of attribute ranks.
16 17 18 |
# File 'lib/wowr/guild_bank.rb', line 16 def ranks @ranks end |