Class: Wowr::Classes::SkillCategory
- Inherits:
-
Object
- Object
- Wowr::Classes::SkillCategory
- Defined in:
- lib/wowr/character.rb
Overview
General skill category eg Weapon Skills, Languages
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute name.
-
#skills ⇒ Object
readonly
Returns the value of attribute skills.
Instance Method Summary collapse
-
#initialize(elem) ⇒ SkillCategory
constructor
A new instance of SkillCategory.
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
#key ⇒ Object (readonly)
Returns the value of attribute key.
750 751 752 |
# File 'lib/wowr/character.rb', line 750 def key @key end |
#name ⇒ Object (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 |
#skills ⇒ Object (readonly)
Returns the value of attribute skills.
750 751 752 |
# File 'lib/wowr/character.rb', line 750 def skills @skills end |