class LUSI::API::Course::SyllabusRuleModule

Represents a syllabus rule in the LUSI API

Attributes

display_long_title[RW]

@!attribute [rw] display_long_title

@return [String, nil] the long title of the rule
display_short_title[RW]

@!attribute [rw] display_short_title

@return [String, nil] the short title of the rule
identity[RW]

@!attribute [rw] identity

@return [LUSI::API::Course::Identity, nil] the identity code of the associatied module or scheme of study

Public Class Methods

new(xml = nil, lookup = nil, display_long_title: nil, display_short_title: nil, identity: nil) click to toggle source

Initialises a new SyllabusRuleModule instance @param xml [Nokogiri::XML::Document, Nokogiri::XML::Node] the parsed XML root of the syllabus rule module @param lookup [LUSI::API::Core::Lookup::LookupService, nil] the lookup service for object resolution @param identity [String, nil] the default identity code @param display_long_title [String, nil] the default long title @param display_short_title [String, nil] the default short title @return [void]

# File lib/lusi_api/course.rb, line 1038
def initialize(xml = nil, lookup = nil, display_long_title: nil, display_short_title: nil, identity: nil)
  @display_long_title = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:DisplayLongTitle', display_long_title)
  @display_short_title = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:DisplayShortTitle', display_short_title)
  @identity = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:Identity', identity)
end

Public Instance Methods

to_s() click to toggle source

Returns a string representation to the SyllabusRuleModule instance @return [String] the string representation to the SyllabusRuleModule instance

# File lib/lusi_api/course.rb, line 1046
def to_s
  @display_long_title
end