Class: LUSI::API::Course::AssessmentProportion
- Inherits:
-
Object
- Object
- LUSI::API::Course::AssessmentProportion
- Defined in:
- lib/lusi_api/course.rb
Overview
Represents a module assessment proportion in the LUSI API
Instance Attribute Summary collapse
-
#assessment_status ⇒ LUSI::API::Core::Code?
The assessment status.
-
#assessment_type ⇒ LUSI::API::Core::Code?
The assessment type.
-
#percentage ⇒ Integer?
The percentage value.
Instance Method Summary collapse
-
#initialize(xml = nil, lookup = nil, assessment_status: nil, assessment_type: nil, percentage: nil) ⇒ void
constructor
Initialises a new AssessmentProportion instance.
-
#to_s ⇒ String
Returns a string representation of the AssessmentProportion instance.
Constructor Details
#initialize(xml = nil, lookup = nil, assessment_status: nil, assessment_type: nil, percentage: nil) ⇒ void
Initialises a new AssessmentProportion instance
438 439 440 441 442 443 444 |
# File 'lib/lusi_api/course.rb', line 438 def initialize(xml = nil, lookup = nil, assessment_status: nil, assessment_type: nil, percentage: nil) @assessment_status = LUSI::API::Core::Code.new(LUSI::API::Core::XML.xml_at(xml, 'xmlns:AssessmentStatus', assessment_status), lookup) @assessment_type = LUSI::API::Core::Code.new(LUSI::API::Core::XML.xml_at(xml, 'xmlns:AssessmentType', assessment_type), lookup) @percentage = LUSI::API::Core::XML.xml_int_at(xml, 'xmlns:Percentage', percentage) end |
Instance Attribute Details
#assessment_status ⇒ LUSI::API::Core::Code?
Returns the assessment status.
429 430 431 |
# File 'lib/lusi_api/course.rb', line 429 def assessment_status @assessment_status end |
#assessment_type ⇒ LUSI::API::Core::Code?
Returns the assessment type.
421 422 423 |
# File 'lib/lusi_api/course.rb', line 421 def assessment_type @assessment_type end |
#percentage ⇒ Integer?
Returns the percentage value.
425 426 427 |
# File 'lib/lusi_api/course.rb', line 425 def percentage @percentage end |
Instance Method Details
#to_s ⇒ String
Returns a string representation of the AssessmentProportion instance
448 449 450 |
# File 'lib/lusi_api/course.rb', line 448 def to_s "#{@assessment_type.description} #{percentage}%" end |