Class: Qti::V1::Models::Choices::FillBlankChoice
- Inherits:
-
Base
- Object
- Models::Base
- Base
- Qti::V1::Models::Choices::FillBlankChoice
- Defined in:
- lib/qti/v1/models/choices/fill_blank_choice.rb
Constant Summary
Constants inherited from Models::Base
Instance Attribute Summary
Attributes inherited from Models::Base
Instance Method Summary collapse
- #identifier ⇒ Object
-
#initialize(node) ⇒ FillBlankChoice
constructor
A new instance of FillBlankChoice.
- #item_body ⇒ Object
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) ⇒ FillBlankChoice
Returns a new instance of FillBlankChoice.
8 9 10 |
# File 'lib/qti/v1/models/choices/fill_blank_choice.rb', line 8 def initialize(node) @node = node end |
Instance Method Details
#identifier ⇒ Object
12 13 14 15 |
# File 'lib/qti/v1/models/choices/fill_blank_choice.rb', line 12 def identifier @identifier ||= @node.attributes['respident']&.value || @node.attributes['ident']&.value end |
#item_body ⇒ Object
17 18 19 20 21 22 |
# File 'lib/qti/v1/models/choices/fill_blank_choice.rb', line 17 def item_body @item_body ||= begin node = @node.dup node.content.squish end end |