Class: Wowr::Classes::Item
- Inherits:
-
Object
- Object
- Wowr::Classes::Item
- Defined in:
- lib/wowr/classes.rb
Overview
Most basic Composed of an ItemInfo and Needs to be consolidated with ItemInfo and other stuff to be a parent class that they extend?
Direct Known Subclasses
CreatedItem, EquippedItem, ItemInfo, ItemTooltip, PlanItem, SearchItem
Instance Attribute Summary collapse
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#id ⇒ Object
(also: #item_id)
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(elem) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(elem) ⇒ Item
Returns a new instance of Item.
22 23 24 25 26 |
# File 'lib/wowr/classes.rb', line 22 def initialize(elem) @id = elem[:id].to_i @name = elem[:name] @icon = elem[:icon] end |
Instance Attribute Details
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
19 20 21 |
# File 'lib/wowr/classes.rb', line 19 def icon @icon end |
#id ⇒ Object (readonly) Also known as: item_id
Returns the value of attribute id.
19 20 21 |
# File 'lib/wowr/classes.rb', line 19 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
19 20 21 |
# File 'lib/wowr/classes.rb', line 19 def name @name end |