Class: TrainingCriterion

Inherits:
Object
  • Object
show all
Defined in:
lib/ruql/open_assessment/training_criterion.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options={})
  @criterion = options[:criterion]
  @option = options[:option]

  # Validation
  if @criterion.nil? || @option.nil?
    raise "Must include criterion and option."
  end
end

Instance Attribute Details

#criterionObject

Returns the value of attribute criterion.



2
3
4
# File 'lib/ruql/open_assessment/training_criterion.rb', line 2

def criterion
  @criterion
end

#optionObject

Returns the value of attribute option.



2
3
4
# File 'lib/ruql/open_assessment/training_criterion.rb', line 2

def option
  @option
end