Class: CourseExam::Grader::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/course_exam/grader.rb

Overview

Grading outcome. +score+ and +cutoff+ are absolute points.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(score: 0, cutoff: 0, passed: false, already_graded: false) ⇒ Result

Returns a new instance of Result.



18
# File 'app/services/course_exam/grader.rb', line 18

def initialize(score: 0, cutoff: 0, passed: false, already_graded: false) = super

Instance Attribute Details

#already_gradedObject (readonly)

Returns the value of attribute already_graded

Returns:

  • (Object)

    the current value of already_graded



17
18
19
# File 'app/services/course_exam/grader.rb', line 17

def already_graded
  @already_graded
end

#cutoffObject (readonly)

Returns the value of attribute cutoff

Returns:

  • (Object)

    the current value of cutoff



17
18
19
# File 'app/services/course_exam/grader.rb', line 17

def cutoff
  @cutoff
end

#passedObject (readonly)

Returns the value of attribute passed

Returns:

  • (Object)

    the current value of passed



17
18
19
# File 'app/services/course_exam/grader.rb', line 17

def passed
  @passed
end

#scoreObject (readonly)

Returns the value of attribute score

Returns:

  • (Object)

    the current value of score



17
18
19
# File 'app/services/course_exam/grader.rb', line 17

def score
  @score
end

Instance Method Details

#already_graded?Boolean

Returns:

  • (Boolean)


22
# File 'app/services/course_exam/grader.rb', line 22

def already_graded? = already_graded

#passed?Boolean

Returns:

  • (Boolean)


20
# File 'app/services/course_exam/grader.rb', line 20

def passed? = passed