Class: Grade

Inherits:
Object
  • Object
show all
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

Constructor Details

#initialize(exam_portion) ⇒ 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_portionObject



14
15
16
# File 'lib/gaku/grading/grade.rb', line 14

def grade_portion
  @grade.grade_portion(@exam_portion)
end