Class: Wowr::Classes::ItemSource

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ ItemSource

Returns a new instance of ItemSource.



381
382
383
384
385
386
387
388
389
390
# File 'lib/wowr/item.rb', line 381

def initialize(elem)
	@value 					= elem[:value]
	@area_id 				= elem[:areaId].to_i 			if elem[:areaId]
	@area_name 			= elem[:areaName]					if elem[:areaName]
	@creature_id 		= elem[:creatureId].to_i	if elem[:creatureId]
	@creature_name 	= elem[:creatureName]			if elem[:creatureName]
	@difficulty 		= elem[:difficulty]				if elem[:difficulty]
	@drop_rate 			= elem[:dropRate].to_i		if elem[:dropRate]
	@required_level	= elem[:reqLvl].to_i			if elem[:reqLvl]
end

Instance Attribute Details

#area_idObject (readonly)

Returns the value of attribute area_id.



376
377
378
# File 'lib/wowr/item.rb', line 376

def area_id
  @area_id
end

#area_nameObject (readonly)

Returns the value of attribute area_name.



376
377
378
# File 'lib/wowr/item.rb', line 376

def area_name
  @area_name
end

#creature_idObject (readonly)

Returns the value of attribute creature_id.



376
377
378
# File 'lib/wowr/item.rb', line 376

def creature_id
  @creature_id
end

#creature_nameObject (readonly)

Returns the value of attribute creature_name.



376
377
378
# File 'lib/wowr/item.rb', line 376

def creature_name
  @creature_name
end

#difficultyObject (readonly)

Returns the value of attribute difficulty.



376
377
378
# File 'lib/wowr/item.rb', line 376

def difficulty
  @difficulty
end

#drop_rateObject (readonly)

Returns the value of attribute drop_rate.



376
377
378
# File 'lib/wowr/item.rb', line 376

def drop_rate
  @drop_rate
end

#valueObject (readonly)

Returns the value of attribute value.



376
377
378
# File 'lib/wowr/item.rb', line 376

def value
  @value
end