Class: Meibo::AcademicSessionSet

Inherits:
DataSet
  • Object
show all
Defined in:
lib/meibo/academic_session_set.rb

Instance Attribute Summary

Attributes inherited from DataSet

#roster

Instance Method Summary collapse

Methods inherited from DataSet

#<<, #each, #empty?, #find, #initialize, #lineno, #where

Constructor Details

This class inherits a constructor from Meibo::DataSet

Instance Method Details

#check_semantically_consistentObject



5
6
7
8
9
10
11
12
13
# File 'lib/meibo/academic_session_set.rb', line 5

def check_semantically_consistent
  super

  each do |academic_session|
    next unless academic_session.parent_sourced_id

    find(academic_session.parent_sourced_id)
  end
end

#grading_periodObject



15
16
17
# File 'lib/meibo/academic_session_set.rb', line 15

def grading_period
  @cache[:grading_period] ||= new(select(&:grading_period?))
end

#school_yearObject



23
24
25
# File 'lib/meibo/academic_session_set.rb', line 23

def school_year
  @cache[:school_year] ||= new(select(&:school_year?))
end

#semesterObject



19
20
21
# File 'lib/meibo/academic_session_set.rb', line 19

def semester
  @cache[:semester] ||= new(select(&:semester?))
end

#termObject



27
28
29
# File 'lib/meibo/academic_session_set.rb', line 27

def term
  @cache[:term] ||= new(select(&:term?))
end