Class: Wowr::Classes::Skill
- Inherits:
-
Object
- Object
- Wowr::Classes::Skill
- Defined in:
- lib/wowr/character.rb
Overview
eg Daggers, Riding, Fishing, language
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#max ⇒ Object
readonly
Returns the value of attribute max.
-
#name ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute name.
-
#value ⇒ Object
(also: #to_i)
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(elem) ⇒ Skill
constructor
A new instance of Skill.
Constructor Details
#initialize(elem) ⇒ Skill
Returns a new instance of Skill.
765 766 767 768 769 770 |
# File 'lib/wowr/character.rb', line 765 def initialize(elem) @key = elem[:key] @name = elem[:name] @value = elem[:value].to_i @max = elem[:max].to_i end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
761 762 763 |
# File 'lib/wowr/character.rb', line 761 def key @key end |
#max ⇒ Object (readonly)
Returns the value of attribute max.
761 762 763 |
# File 'lib/wowr/character.rb', line 761 def max @max end |
#name ⇒ Object (readonly) Also known as: to_s
Returns the value of attribute name.
761 762 763 |
# File 'lib/wowr/character.rb', line 761 def name @name end |
#value ⇒ Object (readonly) Also known as: to_i
Returns the value of attribute value.
761 762 763 |
# File 'lib/wowr/character.rb', line 761 def value @value end |