Class: Wowr::Classes::Item

Inherits:
Object
  • Object
show all
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?

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#iconObject (readonly)

Returns the value of attribute icon.



19
20
21
# File 'lib/wowr/classes.rb', line 19

def icon
  @icon
end

#idObject (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

#nameObject (readonly)

Returns the value of attribute name.



19
20
21
# File 'lib/wowr/classes.rb', line 19

def name
  @name
end