class LUSI::API::Course::SyllabusRuleType

Represents a syllabus rule type in the LUSI API

Attributes

category[RW]

@!attribute [rw] category

@return [String, nil] the rule type category (short description)

Public Class Methods

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

Initialises a new SyllabusRuleType instance @param (see LUSI::API::Core::Code) @param category [String, nil] the default rule type category (short description) @return [void]

Calls superclass method LUSI::API::Core::BasicCode::new
# File lib/lusi_api/course.rb, line 1064
def initialize(xml = nil, lookup = nil, category: nil, **kwargs)
  super(xml, **kwargs)
  @category = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:Category', category)
end

Public Instance Methods

to_s() click to toggle source

Returns a string representation of the SyllabusRuleType instance @return [String] the string representation of the SyllabusRuleType instance

# File lib/lusi_api/course.rb, line 1071
def to_s
  "[#{@category}]: #{@description}"
end