class LUSI::API::Course::Length

Represents the length of a scheme of study

Attributes

absolute_maximum[RW]

@!attribute [rw] absolute_maximum

@return [String, nil] the absolute maximum scheme length
maximum[RW]

@!attribute [rw] maximum

@return [String, nil] the maximum scheme length
minimum[RW]

@!attribute [rw] minimum

@return [String, nil] the minimum scheme length

Public Class Methods

new(xml = nil, lookup = nil, absolute_maximum: nil, maximum: nil, minimum: nil) click to toggle source

Initialises a new Length instance @param xml [Nokogiri::XML::Document, Nokogiri::XML::Node] the parsed XML root of the length @param lookup [LUSI::API::Core::Lookup::LookupService, nil] the lookup service for object resolution @param absolute_maximum [String, nil] the default absolute maximum scheme length @param maximum [String, nil] the default maximum scheme length @param minimum [String, nil] the default minimum scheme length @return [void]

# File lib/lusi_api/course.rb, line 658
def initialize(xml = nil, lookup = nil, absolute_maximum: nil, maximum: nil, minimum: nil)
  @absolute_maximum = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:AbsoluteMaximum', absolute_maximum)
  @maximum = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:Maximum', maximum)
  @minimum = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:Minimum', minimum)
end

Public Instance Methods

to_s() click to toggle source

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

# File lib/lusi_api/course.rb, line 666
def to_s
  "#{minimum} - #{maximum} (#{absolute_maximum})"
end