Class: WoW::Recipe

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=

Constructor Details

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

Returns a new instance of Recipe.



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

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

Class Method Details

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



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

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