Class: Wowr::Classes::DisenchantItem

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

Overview

<item name=“Void Crystal” minCount=“1” maxCount=“2” icon=“inv_enchant_voidcrystal” type=“Enchanting” level=“70” dropRate=“6” id=“22450” quality=“4”></item>

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ DisenchantItem

Returns a new instance of DisenchantItem.



1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
# File 'lib/wowr/classes.rb', line 1144

def initialize(elem)
	@name 			= elem[:name]
	@id 				= elem[:id].to_i
	@icon 			= elem[:icon]
	@level 			= elem[:level].to_i
	@type 			= elem[:type]
	@drop_rate 	= elem[:dropRate].to_i
	@min_count 	= elem[:minCount].to_i
	@max_count 	= elem[:maxCount].to_i
	@quality 		= elem[:quality].to_i
end

Instance Attribute Details

#drop_rateObject (readonly)

Returns the value of attribute drop_rate.



1142
1143
1144
# File 'lib/wowr/classes.rb', line 1142

def drop_rate
  @drop_rate
end

#iconObject (readonly)

Returns the value of attribute icon.



1142
1143
1144
# File 'lib/wowr/classes.rb', line 1142

def icon
  @icon
end

#idObject (readonly)

Returns the value of attribute id.



1142
1143
1144
# File 'lib/wowr/classes.rb', line 1142

def id
  @id
end

#levelObject (readonly)

Returns the value of attribute level.



1142
1143
1144
# File 'lib/wowr/classes.rb', line 1142

def level
  @level
end

#max_countObject (readonly)

Returns the value of attribute max_count.



1142
1143
1144
# File 'lib/wowr/classes.rb', line 1142

def max_count
  @max_count
end

#min_countObject (readonly)

Returns the value of attribute min_count.



1142
1143
1144
# File 'lib/wowr/classes.rb', line 1142

def min_count
  @min_count
end

#nameObject (readonly)

Returns the value of attribute name.



1142
1143
1144
# File 'lib/wowr/classes.rb', line 1142

def name
  @name
end

#qualityObject (readonly)

Returns the value of attribute quality.



1142
1143
1144
# File 'lib/wowr/classes.rb', line 1142

def quality
  @quality
end

#typeObject (readonly)

Returns the value of attribute type.



1142
1143
1144
# File 'lib/wowr/classes.rb', line 1142

def type
  @type
end