Class: Bnet::Diablo3::Item
- Inherits:
-
BnetResource
- Object
- BnetResource
- Bnet::Diablo3::Item
- Defined in:
- lib/bnet/diablo3/item.rb
Constant Summary
Constants inherited from BnetResource
Instance Attribute Summary collapse
-
#item_id ⇒ Object
Returns the value of attribute item_id.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Methods inherited from BnetResource
Constructor Details
This class inherits a constructor from Bnet::BnetResource
Instance Attribute Details
#item_id ⇒ Object
Returns the value of attribute item_id.
2 3 4 |
# File 'lib/bnet/diablo3/item.rb', line 2 def item_id @item_id end |
#location ⇒ Object
Returns the value of attribute location.
2 3 4 |
# File 'lib/bnet/diablo3/item.rb', line 2 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/bnet/diablo3/item.rb', line 2 def name @name end |
Class Method Details
.from_api(location, raw_response) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/bnet/diablo3/item.rb', line 4 def self.from_api(location, raw_response) item = new(location: location) item.item_id = raw_response["id"] item.name = raw_response["name"] return item end |