class LUSI::API::Course::EnrolmentIdentity

Represents a module or scheme of study enrolment identity in the LUSI API

Attributes

cohort[RW]

@!attribute [rw] cohort

@return [Integer, nil] the identity code of the cohort for this course instance

Public Class Methods

new(xml = nil, lookup = nil, cohort: nil, **kwargs) click to toggle source

Initialises a new EnrolmentIdentity instance @param (see LUSI::API::Course::Identity) @param cohort [Integer, nil] the default cohort identity code @return [void]

Calls superclass method LUSI::API::Course::Identity::new
# File lib/lusi_api/course.rb, line 68
def initialize(xml = nil, lookup = nil, cohort: nil, **kwargs)
  super(xml, lookup, **kwargs)
  @cohort = LUSI::API::Core::XML.xml_int_at(xml, 'xmlns:Cohort', cohort)
end

Public Instance Methods

lookup_key() click to toggle source

(see LUSI::API::Course::Identity#lookup_key)

# File lib/lusi_api/course.rb, line 74
def lookup_key
  "#{super}-#{cohort}"
end