Sha256: d98ad671ab04694f7ad66ef9ff35da0465f2eae6afe2c8760ab4e0854517dceb

Contents?: true

Size: 577 Bytes

Versions: 11

Compression:

Stored size: 577 Bytes

Contents

# frozen_string_literal: true

module Meibo
  class ClassroomSet < DataSet
    def check_semantically_consistent
      super

      each do |classroom|
        roster.organizations.find(classroom.school_sourced_id)
        roster.courses.find(classroom.course_sourced_id)

        if classroom.term_sourced_ids.empty?
          raise DataNotFoundError, "termSourcedIdは1つ以上指定してください"
        end

        classroom.term_sourced_ids.each do |term_sourced_id|
          roster.academic_sessions.find(term_sourced_id)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
meibo-0.12.0 lib/meibo/classroom_set.rb
meibo-0.11.0 lib/meibo/classroom_set.rb
meibo-0.10.0 lib/meibo/classroom_set.rb
meibo-0.9.0 lib/meibo/classroom_set.rb
meibo-0.8.0 lib/meibo/classroom_set.rb
meibo-0.7.0 lib/meibo/classroom_set.rb
meibo-0.6.0 lib/meibo/classroom_set.rb
meibo-0.5.0 lib/meibo/classroom_set.rb
meibo-0.4.0 lib/meibo/classroom_set.rb
meibo-0.3.0 lib/meibo/classroom_set.rb
meibo-0.2.0 lib/meibo/classroom_set.rb