Class: Training
- Inherits:
-
Object
- Object
- Training
- Defined in:
- lib/ruql/open_assessment/training.rb
Instance Attribute Summary collapse
-
#training_answer ⇒ Object
Returns the value of attribute training_answer.
-
#training_criterions ⇒ Object
Returns the value of attribute training_criterions.
Instance Method Summary collapse
-
#answer(s) ⇒ Object
Sets the answer for the training response.
-
#initialize(options = {}) ⇒ Training
constructor
Initializes a training response.
-
#training_criterion(*args) ⇒ Object
Adds a training criterion and evaluates to proc block.
Constructor Details
#initialize(options = {}) ⇒ Training
Initializes a training response
7 8 9 |
# File 'lib/ruql/open_assessment/training.rb', line 7 def initialize(={}) @training_criterions = [] end |
Instance Attribute Details
#training_answer ⇒ Object
Returns the value of attribute training_answer.
3 4 5 |
# File 'lib/ruql/open_assessment/training.rb', line 3 def training_answer @training_answer end |
#training_criterions ⇒ Object
Returns the value of attribute training_criterions.
3 4 5 |
# File 'lib/ruql/open_assessment/training.rb', line 3 def training_criterions @training_criterions end |
Instance Method Details
#answer(s) ⇒ Object
Sets the answer for the training response
13 |
# File 'lib/ruql/open_assessment/training.rb', line 13 def answer(s) ; @training_answer = s ; end |
#training_criterion(*args) ⇒ Object
Adds a training criterion and evaluates to proc block
17 18 19 20 |
# File 'lib/ruql/open_assessment/training.rb', line 17 def training_criterion(*args) training = TrainingCriterion.new(*args) @training_criterions << training end |