Class: Qti::V1::Models::Interactions::LogicalIdentifierInteraction
- Inherits:
-
Base
- Object
- Models::Base
- Base
- Qti::V1::Models::Interactions::LogicalIdentifierInteraction
- Defined in:
- lib/qti/v1/models/interactions/logical_identifier_interaction.rb
Constant Summary
Constants inherited from Models::Base
Instance Method Summary collapse
- #answers ⇒ Object
-
#initialize(node) ⇒ LogicalIdentifierInteraction
constructor
A new instance of LogicalIdentifierInteraction.
- #shuffled? ⇒ Boolean
Methods inherited from Base
Methods inherited from Models::Base
#css_with_single_check, from_path!, #parse_xml, #remap_href_path, #remap_unknown_tags_transformer, #sanitize_config, #sanitize_content!, #xpath_with_single_check
Constructor Details
#initialize(node) ⇒ LogicalIdentifierInteraction
Returns a new instance of LogicalIdentifierInteraction.
9 10 11 |
# File 'lib/qti/v1/models/interactions/logical_identifier_interaction.rb', line 9 def initialize(node) @node = node end |
Instance Method Details
#answers ⇒ Object
17 18 19 20 21 |
# File 'lib/qti/v1/models/interactions/logical_identifier_interaction.rb', line 17 def answers @answers ||= answer_nodes.map do |node| V1::Models::Choices::LogicalIdentifierChoice.new(node) end end |
#shuffled? ⇒ Boolean
13 14 15 |
# File 'lib/qti/v1/models/interactions/logical_identifier_interaction.rb', line 13 def shuffled? @node.at_xpath('.//render_choice/@shuffle')&.value == 'Yes' end |