Class: WoW::Item
Defined Under Namespace
Classes: Set
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id, params = {}) ⇒ Item
constructor
A new instance of Item.
Methods inherited from Base
Constructor Details
#initialize(id, params = {}) ⇒ Item
Returns a new instance of Item.
5 6 7 |
# File 'lib/wow/features/item.rb', line 5 def initialize(id, params = {}) super(self.class.data(id, params)) end |
Class Method Details
.data(id, params = {}) ⇒ Object
10 11 12 13 |
# File 'lib/wow/features/item.rb', line 10 def data(id, params = {}) params.merge!({locale: WoW.locale}) get("/#{id}", query: params).parsed_response end |