Class: WoW::Guild

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=

Constructor Details

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

Returns a new instance of Guild.



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

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



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

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