Class: WoW::BattlePet::Species

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from WoW::Base

#[], #[]=

Constructor Details

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

Returns a new instance of Species.



22
23
24
# File 'lib/wow/features/battle_pet.rb', line 22

def initialize(id, params = {})
  super(self.class.data(id, params))
end

Class Method Details

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



27
28
29
30
# File 'lib/wow/features/battle_pet.rb', line 27

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