Class: WoW::Recipe

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#get, #get?, #gets

Constructor Details

#initialize(id, params = {}) ⇒ Recipe

Returns a new instance of Recipe.



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

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

Class Method Details

.data(id, params = {}) ⇒ Object



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

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