Class: Nokogiri::XML::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/matcher/nokogiri_extensions.rb

Instance Method Summary collapse

Instance Method Details

#match?(other, matcher) ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
26
27
# File 'lib/matcher/nokogiri_extensions.rb', line 23

def match?(other, matcher)
  @matcher = matcher
  return false unless other_elem = matching(other, matcher)
  children_match?(other_elem) & attributes_match?(other_elem)
end