class LUSI::API::Course::CreditPoints
Represents the credit points for a scheme of study
Attributes
@!attribute [rw] part_2_year_2
@return [Integer, nil] the number of Part 2 credit points required in year 2
@!attribute [rw] part_2_year_3
@return [Integer, nil] the number of Part 2 credit points required in year 3
@!attribute [rw] part_2_year_4
@return [Integer, nil] the number of Part 2 credit points required in year 4
@!attribute [rw] part_2_year_5
@return [Integer, nil] the number of Part 2 credit points required in year 5
@!attribute [rw] total_overall
@return [Integer, nil] the total number of credit points required for the scheme of study
@!attribute [rw] total_part_1
@return [Integer, nil] the total number of credit points required at Part 1
@!attribute [rw] total_part_2
@return [Integer, nil] the total number of credit points required at Part 2
Public Class Methods
Initialises a new CreditPoints
instance @param xml [Nokogiri::XML::Document, Nokogiri::XML::Node] the parsed XML root of the credit points @param lookup [LUSI::API::Core::Lookup::LookupService, nil] the lookup service for object resolution @param part_2_year_2
[Integer, nil] the default part 2 year 2 credit points @param part_2_year_3
[Integer, nil] the default part 2 year 3 credit points @param part_2_year_4
[Integer, nil] the default part 2 year 4 credit points @param part_2_year_5
[Integer, nil] the default part 2 year 5 credit points @param total_overall
[Integer, nil] the default overall total credit points @param total_part_1
[Integer, nil] the default part 1 total credit points @param total_part_2
[Integer, nil] the default part 2 total @return [void]
# File lib/lusi_api/course.rb, line 616 def initialize(xml = nil, lookup = nil, part_2_year_2: 0, part_2_year_3: 0, part_2_year_4: 0, part_2_year_5: 0, total_overall: 0, total_part_1: 0, total_part_2: 0) @part_2_year_2 = LUSI::API::Core::XML.xml_int_at(xml, 'xmlns:Part2Year2', part_2_year_2) @part_2_year_3 = LUSI::API::Core::XML.xml_int_at(xml, 'xmlns:Part2Year3', part_2_year_3) @part_2_year_4 = LUSI::API::Core::XML.xml_int_at(xml, 'xmlns:Part2Year4', part_2_year_4) @part_2_year_5 = LUSI::API::Core::XML.xml_int_at(xml, 'xmlns:Part2Year5', part_2_year_5) @total_overall = LUSI::API::Core::XML.xml_int_at(xml, 'xmlns:TotalOverall', total_overall) @total_part_1 = LUSI::API::Core::XML.xml_int_at(xml, 'xmlns:TotalPart1', total_part_1) @total_part_2 = LUSI::API::Core::XML.xml_int_at(xml, 'xmlns:TotalPart2', total_part_2) end
Public Instance Methods
Returns a string representation of the CreditPoints
instance @return [String] the string representation of the CreditPoints
instance
# File lib/lusi_api/course.rb, line 629 def to_s "#{@total_overall}" end