Class: Nem::Model::Experience
- Inherits:
-
Object
- Object
- Nem::Model::Experience
- Includes:
- Nem::Mixin::Assignable
- Defined in:
- lib/nem/model/experience.rb
Defined Under Namespace
Classes: ExperienceData
Instance Attribute Summary collapse
-
#experience ⇒ Object
readonly
Returns the value of attribute experience.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#syncs ⇒ Object
readonly
Returns the value of attribute syncs.
Class Method Summary collapse
Methods included from Nem::Mixin::Assignable
Instance Attribute Details
#experience ⇒ Object (readonly)
Returns the value of attribute experience.
6 7 8 |
# File 'lib/nem/model/experience.rb', line 6 def experience @experience end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
6 7 8 |
# File 'lib/nem/model/experience.rb', line 6 def node @node end |
#syncs ⇒ Object (readonly)
Returns the value of attribute syncs.
6 7 8 |
# File 'lib/nem/model/experience.rb', line 6 def syncs @syncs end |
Class Method Details
.new_from_experience(hash) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/nem/model/experience.rb', line 10 def self.new_from_experience(hash) exp = hash[:experience] new( node: Nem::Model::Node.new_from_node(hash[:node]), syncs: hash[:syncs], experience: ExperienceData.new(exp[:s], exp[:f]) ) end |