Class: Gaku::Grading::Single::Ordinal

Inherits:
BaseMethod
  • Object
show all
Defined in:
lib/gaku/grading/single/ordinal.rb

Instance Attribute Summary

Attributes inherited from BaseMethod

#gradable, #gradable_scope, #gradable_type, #result, #student

Instance Method Summary collapse

Methods inherited from BaseMethod

#grade, #initialize

Constructor Details

This class inherits a constructor from Gaku::Grading::Single::BaseMethod

Instance Method Details

#grade_examObject

attr_accessor :criteria



5
6
7
8
9
# File 'lib/gaku/grading/single/ordinal.rb', line 5

def grade_exam
  exam = @gradable
  percentage = Gaku::Grading::Single::Percentage.new(exam, @student, gradable_scope).grade
  @result = { id: @student.id, score: ordinal(percentage['score']) }
end