Class: Qti::V1::Models::Numerics::ScoringData
- Inherits:
-
Object
- Object
- Qti::V1::Models::Numerics::ScoringData
- Defined in:
- lib/qti/v1/models/numerics/scoring_data.rb
Defined Under Namespace
Classes: UnsupportedNumreicType
Instance Method Summary collapse
-
#initialize(node) ⇒ ScoringData
constructor
A new instance of ScoringData.
- #scoring_data ⇒ Object
- #unknown_type ⇒ Object
Constructor Details
#initialize(node) ⇒ ScoringData
Returns a new instance of ScoringData.
8 9 10 |
# File 'lib/qti/v1/models/numerics/scoring_data.rb', line 8 def initialize(node) @scoring_node = ScoringNode.new(node) end |
Instance Method Details
#scoring_data ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/qti/v1/models/numerics/scoring_data.rb', line 12 def scoring_data ExactMatch.new(@scoring_node).scoring_data || MarginError.new(@scoring_node).scoring_data || Precision.new(@scoring_node).scoring_data || WithinRange.new(@scoring_node).scoring_data || unknown_type end |
#unknown_type ⇒ Object
20 21 22 |
# File 'lib/qti/v1/models/numerics/scoring_data.rb', line 20 def unknown_type raise UnsupportedNumreicType, 'Unsupported Numeric Type' end |