Class: CourseExam::Grader::Result
- Inherits:
-
Data
- Object
- Data
- CourseExam::Grader::Result
- Defined in:
- app/services/course_exam/grader.rb
Overview
Grading outcome. +score+ and +cutoff+ are absolute points.
Instance Attribute Summary collapse
-
#already_graded ⇒ Object
readonly
Returns the value of attribute already_graded.
-
#cutoff ⇒ Object
readonly
Returns the value of attribute cutoff.
-
#passed ⇒ Object
readonly
Returns the value of attribute passed.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
Instance Method Summary collapse
- #already_graded? ⇒ Boolean
-
#initialize(score: 0, cutoff: 0, passed: false, already_graded: false) ⇒ Result
constructor
A new instance of Result.
- #passed? ⇒ Boolean
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_graded ⇒ Object (readonly)
Returns the value of attribute already_graded
17 18 19 |
# File 'app/services/course_exam/grader.rb', line 17 def already_graded @already_graded end |
#cutoff ⇒ Object (readonly)
Returns the value of attribute cutoff
17 18 19 |
# File 'app/services/course_exam/grader.rb', line 17 def cutoff @cutoff end |
#passed ⇒ Object (readonly)
Returns the value of attribute passed
17 18 19 |
# File 'app/services/course_exam/grader.rb', line 17 def passed @passed end |
#score ⇒ Object (readonly)
Returns the value of attribute score
17 18 19 |
# File 'app/services/course_exam/grader.rb', line 17 def score @score end |
Instance Method Details
#already_graded? ⇒ Boolean
22 |
# File 'app/services/course_exam/grader.rb', line 22 def already_graded? = already_graded |
#passed? ⇒ Boolean
20 |
# File 'app/services/course_exam/grader.rb', line 20 def passed? = passed |