Class: Wowr::Classes::GuildBankLog

Inherits:
GuildBank show all
Defined in:
lib/wowr/guild_bank.rb

Overview

Consists of multiple groups, each with 1000 entries

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) ⇒ GuildBankLog

Returns a new instance of GuildBankLog.



59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/wowr/guild_bank.rb', line 59

def initialize(elem, api = nil)
	super(elem)
	
	@entries = []
	(elem%'banklogs'/:banklog).each do |entry|
		@entries << GuildBankLogEntry.new(entry, self, api)
	end

     @group_now = (elem%'banklogs')[:now].to_i
     @group_next = (elem%'banklogs')[:next].to_i
     @group_prev = (elem%'banklogs')[:prev].to_i
end

Instance Attribute Details

#entriesObject (readonly)

Returns the value of attribute entries.



57
58
59
# File 'lib/wowr/guild_bank.rb', line 57

def entries
  @entries
end

#group_nextObject (readonly)

Returns the value of attribute group_next.



57
58
59
# File 'lib/wowr/guild_bank.rb', line 57

def group_next
  @group_next
end

#group_nowObject (readonly)

Returns the value of attribute group_now.



57
58
59
# File 'lib/wowr/guild_bank.rb', line 57

def group_now
  @group_now
end

#group_prevObject (readonly)

Returns the value of attribute group_prev.



57
58
59
# File 'lib/wowr/guild_bank.rb', line 57

def group_prev
  @group_prev
end