Sha256: b39e2abe0c76a3ff6b4771c7d2a01c64f1552e81a51579b66f2520c6d61424a7

Contents?: true

Size: 739 Bytes

Versions: 19

Compression:

Stored size: 739 Bytes

Contents

# frozen_string_literal: true

module Meibo
  class OrganizationSet < DataSet
    def check_semantically_consistent
      super

      each do |organization|
        next unless organization.parent_sourced_id

        find(organization.parent_sourced_id)
      end
    end

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

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

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

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

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

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

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
meibo-0.27.1 lib/meibo/organization_set.rb
meibo-0.27.0 lib/meibo/organization_set.rb
meibo-0.26.0 lib/meibo/organization_set.rb
meibo-0.25.3 lib/meibo/organization_set.rb
meibo-0.25.2 lib/meibo/organization_set.rb
meibo-0.25.1 lib/meibo/organization_set.rb
meibo-0.25.0 lib/meibo/organization_set.rb
meibo-0.24.0 lib/meibo/organization_set.rb
meibo-0.23.0 lib/meibo/organization_set.rb
meibo-0.22.0 lib/meibo/organization_set.rb
meibo-0.21.0 lib/meibo/organization_set.rb
meibo-0.20.0 lib/meibo/organization_set.rb
meibo-0.19.0 lib/meibo/organization_set.rb
meibo-0.18.0 lib/meibo/organization_set.rb
meibo-0.17.0 lib/meibo/organization_set.rb
meibo-0.16.0 lib/meibo/organization_set.rb
meibo-0.15.0 lib/meibo/organization_set.rb
meibo-0.14.0 lib/meibo/organization_set.rb
meibo-0.13.0 lib/meibo/organization_set.rb