Class: Psychometric::Assessment

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(provider, identity = {}) ⇒ Assessment

Returns a new instance of Assessment.

Raises:



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

#identityObject (readonly)

Returns the value of attribute identity.



19
20
21
# File 'lib/psychometric/assessment.rb', line 19

def identity
  @identity
end