class Qti::V2::Models::Interactions::ShortTextInteraction

Public Class Methods

matches(node, parent) click to toggle source

This will know if a class matches

# File lib/qti/v2/models/interactions/short_text_interaction.rb, line 7
def self.matches(node, parent)
  matches = node.xpath('.//xmlns:textEntryInteraction')
  return false if matches.empty?

  raise Qti::UnsupportedSchema if matches.size > 1
  new(matches.first, parent)
end