Class: WoW::Guild

Inherits:
Base
  • Object
show all
Defined in:
lib/wow/features/guild.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#get, #get?, #gets

Constructor Details

#initialize(realm, guild_name, fields = [], params = {}) ⇒ Guild

Returns a new instance of Guild.



5
6
7
8
# File 'lib/wow/features/guild.rb', line 5

def initialize(realm, guild_name, fields = [], params = {})
  params = params.merge({fields: fields.join(',')})
  super(self.class.data(realm, guild_name, params))
end

Class Method Details

.data(realm, guild_name, params = {}) ⇒ Object



11
12
13
14
# File 'lib/wow/features/guild.rb', line 11

def data(realm, guild_name, params = {})
  params.merge!({locale: WoW.locale})
  get("/#{realm}/#{guild_name}", query: params).parsed_response
end