Method: Qti::Models::Base#css_with_single_check

Defined in:
lib/qti/models/base.rb

#css_with_single_check(css) ⇒ Object

Raises:



52
53
54
55
56
# File 'lib/qti/models/base.rb', line 52

def css_with_single_check(css)
  node_list = @doc.css(css)
  raise Qti::ParseError, 'Too many matches' if node_list.count > 1
  node_list.first
end