Class: Psychometric::Assessment
- Inherits:
-
Object
- Object
- Psychometric::Assessment
- Defined in:
- lib/psychometric/assessment.rb
Overview
# Assessment
This represents the various assessments a Subject can undertake with a Provider. Since different providers have different ways of identifying and organizing their assessments, we give them a dynamic identity.
Defined Under Namespace
Classes: IdentityError, ProviderError
Instance Attribute Summary collapse
-
#identity ⇒ Object
readonly
Returns the value of attribute identity.
Instance Method Summary collapse
-
#initialize(provider, identity = {}) ⇒ Assessment
constructor
A new instance of Assessment.
Constructor Details
#initialize(provider, identity = {}) ⇒ Assessment
Returns a new instance of Assessment.
21 22 23 24 25 |
# File 'lib/psychometric/assessment.rb', line 21 def initialize(provider, identity = {}) raise IdentityError if identity.empty? raise ProviderError unless provider.ancestors.include? Psychometric::Provider @identity = identity end |
Instance Attribute Details
#identity ⇒ Object (readonly)
Returns the value of attribute identity.
19 20 21 |
# File 'lib/psychometric/assessment.rb', line 19 def identity @identity end |