lib/meibo/enrollment_set.rb in meibo-0.12.0 vs lib/meibo/enrollment_set.rb in meibo-0.13.0

- old
+ new

@@ -9,7 +9,23 @@ roster.classes.find(enrollment.class_sourced_id) roster.organizations.find(enrollment.school_sourced_id) roster.users.find(enrollment.user_sourced_id) end end + + def administrator + @cache[:administrator] ||= new(select(&:administrator?)) + end + + def proctor + @cache[:proctor] ||= new(select(&:proctor?)) + end + + def student + @cache[:student] ||= new(select(&:student?)) + end + + def teacher + @cache[:teacher] ||= new(select(&:teacher?)) + end end end