class LUSI::API::Course::CourseEnrolment

The abstract base class for module/scheme of study enrolments @abstract Subclasses must implement lookup_index and alias :course_identity to the accessor for the

subclass-specific identity.

Public Class Methods

lookup_index() click to toggle source

Returns the index name used for the module/scheme of study identity @return [Symbol] the module/scheme of study index name

# File lib/lusi_api/course.rb, line 761
def self.lookup_index
  raise NotImplementedError
end

Public Instance Methods

lookup_indices() click to toggle source

@see (LUSI::API::Enrolment::EnrolmentBase#lookup_indices)

# File lib/lusi_api/course.rb, line 766
def lookup_indices
  super.push(self.lookup_index)
end
lookup_key(index) click to toggle source

@see (LUSI::API::Enrolment::EnrolmentBase#lookup_key)

# File lib/lusi_api/course.rb, line 771
def lookup_key(index)
  # self.course_identity should be defined by all subclasses
  if index == self.lookup_index
    self.course_identity.lookup_key
  else
    super(index)
  end
end