class LUSI::API::Course::CourseDepartment

Represents a department participating in a course

Attributes

identity[RW]

@!attribute [rw] identity

@return [String] the course department identity code
is_major_department[RW]

@!attribute [rw] is_major_department

@return [Boolean] true if the department is the major (administering) department, otherwise false
org_unit[RW]

@!attribute [rw] org_unit

@return [LUSI::API::Organisation::Unit] the organisation unit representing the department
title[RW]

@!attribute [rw] title

@return [String] the course department's title

Public Class Methods

new(xml = nil, lookup = nil, identity: nil, is_major_department: nil, org_unit: nil, title: nil) click to toggle source

Initialises a new CourseDepartment instance @param identity [String] the course department's identity code @param org_unit [LUSI::API::Organisation::Unit] the default organisation unit for the department @param is_major_department [Boolean, nil] the major (administering) department flag @param title [String] the course department's title @return [void]

# File lib/lusi_api/course.rb, line 532
def initialize(xml = nil, lookup = nil, identity: nil, is_major_department: nil, org_unit: nil, title: nil)
  is_major_department = is_major_department ? true : false
  @identity = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:Identity', identity)
  @is_major_department = LUSI::API::Core::XML.xml_boolean_at(xml, 'xmlns:IsMajorDepartment', is_major_department)
  @org_unit = LUSI::API::Core::XML.lookup(xml, lookup, :department, 'xmlns:Identity', org_unit)
  @title = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:Title', title)
end