Class: TrainingCriterion
- Inherits:
-
Object
- Object
- TrainingCriterion
- Defined in:
- lib/ruql/open_assessment/training_criterion.rb
Instance Attribute Summary collapse
-
#criterion ⇒ Object
Returns the value of attribute criterion.
-
#option ⇒ Object
Returns the value of attribute option.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ TrainingCriterion
constructor
Initializes a training criterion for a training response.
Constructor Details
#initialize(options = {}) ⇒ TrainingCriterion
Initializes a training criterion for a training response
6 7 8 9 10 11 12 13 14 |
# File 'lib/ruql/open_assessment/training_criterion.rb', line 6 def initialize(={}) @criterion = [:criterion] @option = [:option] # Validation if @criterion.nil? || @option.nil? raise "Must include criterion and option." end end |
Instance Attribute Details
#criterion ⇒ Object
Returns the value of attribute criterion.
2 3 4 |
# File 'lib/ruql/open_assessment/training_criterion.rb', line 2 def criterion @criterion end |
#option ⇒ Object
Returns the value of attribute option.
2 3 4 |
# File 'lib/ruql/open_assessment/training_criterion.rb', line 2 def option @option end |