Class: LUSI::API::Course::ModuleEvaluationCohort
- Inherits:
-
Object
- Object
- LUSI::API::Course::ModuleEvaluationCohort
- Defined in:
- lib/lusi_api/course.rb
Overview
Represents a module evaluation cohort in the LUSI API
Instance Attribute Summary collapse
-
#cohort identity(identity) ⇒ String?
The identity code of the cohort.
-
#cohort_identity ⇒ Object
Returns the value of attribute cohort_identity.
-
#evaluation_date ⇒ DateTime?
The start date of module evaluation for the cohort.
-
#week_identity ⇒ String?
The starting week identity of module evaluation for the cohort.
Instance Method Summary collapse
-
#initialize(xml = nil, lookup = nil, cohort_identity: nil, evaluation_date: nil, week_identity: nil) ⇒ void
constructor
Initialises a new ModuleEvaluationCohort instance.
-
#to_s ⇒ String
Returns a string representation of the ModuleEvaluationCohort instance.
Constructor Details
#initialize(xml = nil, lookup = nil, cohort_identity: nil, evaluation_date: nil, week_identity: nil) ⇒ void
Initialises a new ModuleEvaluationCohort instance
834 835 836 837 838 |
# File 'lib/lusi_api/course.rb', line 834 def initialize(xml = nil, lookup = nil, cohort_identity: nil, evaluation_date: nil, week_identity: nil) @cohort_identity = LUSI::API::Core::XML.xml_int_at(xml, 'xmlns:CohortIdentity', cohort_identity) @evaluation_date = LUSI::API::Core::XML.xml_datetime_at(xml, 'xmlns:EvaluationDate', evaluation_date) @week_identity = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:WeekIdentity', week_identity) end |
Instance Attribute Details
#cohort identity(identity) ⇒ String?
Returns the identity code of the cohort.
817 |
# File 'lib/lusi_api/course.rb', line 817 attr_accessor :cohort_identity |
#cohort_identity ⇒ Object
Returns the value of attribute cohort_identity.
817 818 819 |
# File 'lib/lusi_api/course.rb', line 817 def cohort_identity @cohort_identity end |
#evaluation_date ⇒ DateTime?
Returns the start date of module evaluation for the cohort.
821 822 823 |
# File 'lib/lusi_api/course.rb', line 821 def evaluation_date @evaluation_date end |
#week_identity ⇒ String?
Returns the starting week identity of module evaluation for the cohort.
825 826 827 |
# File 'lib/lusi_api/course.rb', line 825 def week_identity @week_identity end |
Instance Method Details
#to_s ⇒ String
Returns a string representation of the ModuleEvaluationCohort instance
842 843 844 |
# File 'lib/lusi_api/course.rb', line 842 def to_s "#{@cohort_identity}: #{@evaluation_date}" end |