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.



496
497
498
499
500
501
502
503
504
505
# File 'lib/wowr/item.rb', line 496

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.



494
495
496
# File 'lib/wowr/item.rb', line 494

def item
  @item
end

#reagentsObject (readonly)

Returns the value of attribute reagents.



494
495
496
# File 'lib/wowr/item.rb', line 494

def reagents
  @reagents
end