Class: Meibo::OrganizationSet
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_consistent ⇒ Object
5
6
7
8
9
10
11
12
13
|
# File 'lib/meibo/organization_set.rb', line 5
def check_semantically_consistent
super
each do |organization|
next unless organization.parent_sourced_id
find(organization.parent_sourced_id)
end
end
|
#department ⇒ Object
15
16
17
|
# File 'lib/meibo/organization_set.rb', line 15
def department
@cache[:department] ||= new(select(&:department?))
end
|
#district ⇒ Object
23
24
25
|
# File 'lib/meibo/organization_set.rb', line 23
def district
@cache[:district] ||= new(select(&:district?))
end
|
#local ⇒ Object
27
28
29
|
# File 'lib/meibo/organization_set.rb', line 27
def local
@cache[:local] ||= new(select(&:local?))
end
|
#national ⇒ Object
35
36
37
|
# File 'lib/meibo/organization_set.rb', line 35
def national
@cache[:national] ||= new(select(&:national?))
end
|
#school ⇒ Object
19
20
21
|
# File 'lib/meibo/organization_set.rb', line 19
def school
@cache[:school] ||= new(select(&:school?))
end
|
#state ⇒ Object
31
32
33
|
# File 'lib/meibo/organization_set.rb', line 31
def state
@cache[:state] ||= new(select(&:state?))
end
|