class Qti::V2::Models::Choices::GapMatchChoice
Constants
- PROHIBITED_NODE_NAMES
Public Class Methods
new(node, parent)
click to toggle source
# File lib/qti/v2/models/choices/gap_match_choice.rb, line 7 def initialize(node, parent) @node = node copy_paths_from_item(parent) end
Public Instance Methods
identifier()
click to toggle source
# File lib/qti/v2/models/choices/gap_match_choice.rb, line 12 def identifier @identifier ||= @node.attributes['identifier'].value end
item_body()
click to toggle source
# File lib/qti/v2/models/choices/gap_match_choice.rb, line 16 def item_body @item_body ||= begin node = @node.dup node.children.filter(PROHIBITED_NODE_NAMES).each(&:unlink) sanitize_content!(node.to_html) end end