Class: D3api::Item
- Includes:
- Request
- Defined in:
- lib/d3api/item.rb
Instance Attribute Summary
Attributes inherited from BaseModel
Instance Method Summary collapse
- #find(region, item_hash) ⇒ Object
-
#initialize(region, item_hash) ⇒ Item
constructor
A new instance of Item.
Methods included from Request
Methods included from Connection
Constructor Details
#initialize(region, item_hash) ⇒ Item
Returns a new instance of Item.
5 6 7 8 9 |
# File 'lib/d3api/item.rb', line 5 def initialize(region, item_hash) json_response = find(region, item_hash) super json_response end |
Instance Method Details
#find(region, item_hash) ⇒ Object
11 12 13 |
# File 'lib/d3api/item.rb', line 11 def find(region, item_hash) get(region, "data/item/#{item_hash}") end |