Class: XPath::AncestorIterator
- Inherits:
-
ReverseAxisIterator
- Object
- AxisIterator
- ReverseAxisIterator
- XPath::AncestorIterator
- Defined in:
- lib/xml/xpath.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from ReverseAxisIterator
Methods inherited from AxisIterator
Instance Method Details
#each(node, visitor) ⇒ Object
2588 2589 2590 2591 2592 2593 2594 2595 2596 |
# File 'lib/xml/xpath.rb', line 2588 def each(node, visitor) node = visitor.visit(node).parent while node i = visitor.visit(node) parent = i.parent yield i node = parent end end |