Class: Grade
- Inherits:
-
Object
- Object
- Grade
- Defined in:
- lib/gaku/grading/grade.rb
Constant Summary collapse
- GRADE_METHOD =
rails config for default grading method
'japanese_hs_standard'
Instance Method Summary collapse
- #grade_portion ⇒ Object
-
#initialize(exam_portion) ⇒ Grade
constructor
A new instance of Grade.
Constructor Details
#initialize(exam_portion) ⇒ Grade
Returns a new instance of Grade.
5 6 7 8 9 10 11 12 |
# File 'lib/gaku/grading/grade.rb', line 5 def initialize(exam_portion) @exam_portion = exam_portion #checking grading system # best use will be 'case statement' if GRADE_METHOD == 'japanese_hs_standard' @grade = JapaneseHsStandard.new end end |
Instance Method Details
#grade_portion ⇒ Object
14 15 16 |
# File 'lib/gaku/grading/grade.rb', line 14 def grade_portion @grade.grade_portion(@exam_portion) end |