Class: XPath::ParentIterator

Inherits:
AxisIterator show all
Defined in:
lib/xml/xpath.rb

Instance Method Summary collapse

Methods inherited from AxisIterator

#reverse_order?

Instance Method Details

#each(node, visitor) {|visitor.visit(parent)| ... } ⇒ Object

Yields:

  • (visitor.visit(parent))


2578
2579
2580
2581
# File 'lib/xml/xpath.rb', line 2578

def each(node, visitor)
  parent = visitor.visit(node).parent
  yield visitor.visit(parent) if parent
end