Class: Meibo::RoleSet

Inherits:
DataSet show all
Defined in:
lib/meibo/role_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

#aideObject



24
25
26
# File 'lib/meibo/role_set.rb', line 24

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

#check_semantically_consistentObject



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

def check_semantically_consistent
  super

  each do |role|
    roster.organizations.find(role.org_sourced_id)
    roster.users.find(role.user_sourced_id)

    roster.user_profiles.find(role.) if role.
  end
end

#counselorObject



28
29
30
# File 'lib/meibo/role_set.rb', line 28

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

#district_administratorObject



32
33
34
# File 'lib/meibo/role_set.rb', line 32

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

#guardianObject



36
37
38
# File 'lib/meibo/role_set.rb', line 36

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

#parentObject



40
41
42
# File 'lib/meibo/role_set.rb', line 40

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

#primaryObject



16
17
18
# File 'lib/meibo/role_set.rb', line 16

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

#principalObject



44
45
46
# File 'lib/meibo/role_set.rb', line 44

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

#proctorObject



48
49
50
# File 'lib/meibo/role_set.rb', line 48

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

#relativeObject



52
53
54
# File 'lib/meibo/role_set.rb', line 52

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

#secondaryObject



20
21
22
# File 'lib/meibo/role_set.rb', line 20

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

#site_administratorObject



56
57
58
# File 'lib/meibo/role_set.rb', line 56

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

#studentObject



60
61
62
# File 'lib/meibo/role_set.rb', line 60

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

#system_administratorObject



64
65
66
# File 'lib/meibo/role_set.rb', line 64

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

#teacherObject



68
69
70
# File 'lib/meibo/role_set.rb', line 68

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