Class: Wowr::Classes::SkillCategory

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

Overview

General skill category eg Weapon Skills, Languages

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ SkillCategory

Returns a new instance of SkillCategory.



753
754
755
756
757
758
759
760
761
# File 'lib/wowr/character.rb', line 753

def initialize(elem)
	@key 	= elem[:key]
	@name = elem[:name]

	@skills = {}
	(elem/:skill).each do |skill|
		@skills[skill[:key]] = Skill.new(skill)
	end
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



750
751
752
# File 'lib/wowr/character.rb', line 750

def key
  @key
end

#nameObject (readonly) Also known as: to_s

Returns the value of attribute name.



750
751
752
# File 'lib/wowr/character.rb', line 750

def name
  @name
end

#skillsObject (readonly)

Returns the value of attribute skills.



750
751
752
# File 'lib/wowr/character.rb', line 750

def skills
  @skills
end