Class: Wowr::Classes::ItemCreation

Inherits:
Item
  • Object
show all
Defined in:
lib/wowr/item.rb

Overview

TODO rename There is some sort of opposite relationship between PlansFor and CreatedBy

Direct Known Subclasses

ItemCreatedBy, ItemPlansFor

Instance Attribute Summary collapse

Attributes inherited from Item

#icon_base, #id, #name

Instance Method Summary collapse

Methods inherited from Item

#icon

Constructor Details

#initialize(elem, api = nil) ⇒ ItemCreation

Returns a new instance of ItemCreation.



537
538
539
540
541
542
543
544
545
546
# File 'lib/wowr/item.rb', line 537

def initialize(elem, api = nil)
	super(elem, api)
	
	if (elem%'reagent')
		@reagents = []
		(elem/:reagent).each do |reagent|
			@reagents << Reagent.new(reagent, api)
		end
	end
end

Instance Attribute Details

#itemObject (readonly)

Returns the value of attribute item.



535
536
537
# File 'lib/wowr/item.rb', line 535

def item
  @item
end

#reagentsObject (readonly)

Returns the value of attribute reagents.



535
536
537
# File 'lib/wowr/item.rb', line 535

def reagents
  @reagents
end