Class: LUSI::API::Course::Mark
- Inherits:
-
Object
- Object
- LUSI::API::Course::Mark
- Defined in:
- lib/lusi_api/course.rb
Overview
Represents a module mark in the LUSI API
Instance Attribute Summary collapse
-
#overall_aggregation ⇒ Float?
The overall aggregation score for the module.
-
#overall_percentage ⇒ Float?
The overall percentage mark for the module.
Instance Method Summary collapse
-
#initialize(xml = nil, lookup = nil, overall_percentage: nil, overall_aggregation: nil) ⇒ void
constructor
Initialises a new Mark instance.
-
#to_s ⇒ String
Returns a string representation of the Mark instance.
Constructor Details
#initialize(xml = nil, lookup = nil, overall_percentage: nil, overall_aggregation: nil) ⇒ void
Initialises a new Mark instance
690 691 692 693 694 |
# File 'lib/lusi_api/course.rb', line 690 def initialize(xml = nil, lookup = nil, overall_percentage: nil, overall_aggregation: nil) @overall_percentage = LUSI::API::Core::XML.xml_float_at(xml, 'xmlns:OverallPercentage', overall_percentage) @overall_aggregation = LUSI::API::Core::XML.xml_float_at(xml, 'xmlns:OverallAggregation', overall_aggregation) end |
Instance Attribute Details
#overall_aggregation ⇒ Float?
Returns the overall aggregation score for the module.
682 683 684 |
# File 'lib/lusi_api/course.rb', line 682 def overall_aggregation @overall_aggregation end |
#overall_percentage ⇒ Float?
Returns the overall percentage mark for the module.
678 679 680 |
# File 'lib/lusi_api/course.rb', line 678 def overall_percentage @overall_percentage end |
Instance Method Details
#to_s ⇒ String
Returns a string representation of the Mark instance
698 699 700 |
# File 'lib/lusi_api/course.rb', line 698 def to_s "#{@overall_aggregation} (#{@overall_percentage}%)" end |