Class: LUSI::API::Course::SyllabusRuleType
- Inherits:
-
LUSI::API::Core::Code
- Object
- LUSI::API::Core::BasicCode
- LUSI::API::Core::Code
- LUSI::API::Course::SyllabusRuleType
- Defined in:
- lib/lusi_api/course.rb
Overview
Represents a syllabus rule type in the LUSI API
Instance Attribute Summary collapse
-
#category ⇒ String?
The rule type category (short description).
Attributes inherited from LUSI::API::Core::BasicCode
Instance Method Summary collapse
-
#initialize(xml = nil, lookup = nil, category: nil, **kwargs) ⇒ void
constructor
Initialises a new SyllabusRuleType instance.
-
#to_s ⇒ String
Returns a string representation of the SyllabusRuleType instance.
Methods inherited from LUSI::API::Core::Code
Methods inherited from LUSI::API::Core::BasicCode
Constructor Details
#initialize(xml = nil, lookup = nil, category: nil, **kwargs) ⇒ void
Initialises a new SyllabusRuleType instance
1064 1065 1066 1067 |
# 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 |
Instance Attribute Details
#category ⇒ String?
Returns the rule type category (short description).
1058 1059 1060 |
# File 'lib/lusi_api/course.rb', line 1058 def category @category end |
Instance Method Details
#to_s ⇒ String
Returns a string representation of the SyllabusRuleType instance
1071 1072 1073 |
# File 'lib/lusi_api/course.rb', line 1071 def to_s "[#{@category}]: #{@description}" end |