Class: LUSI::API::Course::EnrolmentIdentity
- Defined in:
- lib/lusi_api/course.rb
Overview
Represents a module or scheme of study enrolment identity in the LUSI API
Instance Attribute Summary collapse
-
#cohort ⇒ Integer?
The identity code of the cohort for this course instance.
Attributes inherited from Identity
Instance Method Summary collapse
-
#initialize(xml = nil, lookup = nil, cohort: nil, **kwargs) ⇒ void
constructor
Initialises a new EnrolmentIdentity instance.
-
#lookup_key ⇒ String
Returns a string suitable for use as a hash lookup key.
Methods inherited from Identity
Constructor Details
#initialize(xml = nil, lookup = nil, cohort: nil, **kwargs) ⇒ void
Initialises a new EnrolmentIdentity instance
68 69 70 71 |
# 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 |
Instance Attribute Details
#cohort ⇒ Integer?
Returns the identity code of the cohort for this course instance.
62 63 64 |
# File 'lib/lusi_api/course.rb', line 62 def cohort @cohort end |
Instance Method Details
#lookup_key ⇒ String
Returns a string suitable for use as a hash lookup key
74 75 76 |
# File 'lib/lusi_api/course.rb', line 74 def lookup_key "#{super}-#{cohort}" end |