Class: LUSI::API::Course::CreditPoints
- Inherits:
-
Object
- Object
- LUSI::API::Course::CreditPoints
- Defined in:
- lib/lusi_api/course.rb
Overview
Represents the credit points for a scheme of study
Instance Attribute Summary collapse
-
#part_2_year_2 ⇒ Integer?
The number of Part 2 credit points required in year 2.
-
#part_2_year_3 ⇒ Integer?
The number of Part 2 credit points required in year 3.
-
#part_2_year_4 ⇒ Integer?
The number of Part 2 credit points required in year 4.
-
#part_2_year_5 ⇒ Integer?
The number of Part 2 credit points required in year 5.
-
#total_overall ⇒ Integer?
The total number of credit points required for the scheme of study.
-
#total_part_1 ⇒ Integer?
The total number of credit points required at Part 1.
-
#total_part_2 ⇒ Integer?
The total number of credit points required at Part 2.
Instance Method Summary collapse
-
#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) ⇒ void
constructor
Initialises a new CreditPoints instance.
-
#to_s ⇒ String
Returns a string representation of the CreditPoints instance.
Constructor Details
#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) ⇒ void
Initialises a new CreditPoints instance
616 617 618 619 620 621 622 623 624 625 |
# 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 |
Instance Attribute Details
#part_2_year_2 ⇒ Integer?
Returns the number of Part 2 credit points required in year 2.
583 584 585 |
# File 'lib/lusi_api/course.rb', line 583 def part_2_year_2 @part_2_year_2 end |
#part_2_year_3 ⇒ Integer?
Returns the number of Part 2 credit points required in year 3.
587 588 589 |
# File 'lib/lusi_api/course.rb', line 587 def part_2_year_3 @part_2_year_3 end |
#part_2_year_4 ⇒ Integer?
Returns the number of Part 2 credit points required in year 4.
591 592 593 |
# File 'lib/lusi_api/course.rb', line 591 def part_2_year_4 @part_2_year_4 end |
#part_2_year_5 ⇒ Integer?
Returns the number of Part 2 credit points required in year 5.
595 596 597 |
# File 'lib/lusi_api/course.rb', line 595 def part_2_year_5 @part_2_year_5 end |
#total_overall ⇒ Integer?
Returns the total number of credit points required for the scheme of study.
603 604 605 |
# File 'lib/lusi_api/course.rb', line 603 def total_overall @total_overall end |
#total_part_1 ⇒ Integer?
Returns the total number of credit points required at Part 1.
579 580 581 |
# File 'lib/lusi_api/course.rb', line 579 def total_part_1 @total_part_1 end |
#total_part_2 ⇒ Integer?
Returns the total number of credit points required at Part 2.
599 600 601 |
# File 'lib/lusi_api/course.rb', line 599 def total_part_2 @total_part_2 end |
Instance Method Details
#to_s ⇒ String
Returns a string representation of the CreditPoints instance
629 630 631 |
# File 'lib/lusi_api/course.rb', line 629 def to_s "#{@total_overall}" end |