Class: WoW::BattlePet::Ability

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

#get, #get?, #gets

Constructor Details

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

Returns a new instance of Ability.



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

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

Class Method Details

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



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

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