Class: XPath::DescendantIterator
- Inherits:
-
AxisIterator
- Object
- AxisIterator
- XPath::DescendantIterator
- Defined in:
- lib/xml/xpath.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from AxisIterator
Instance Method Details
#each(node, visitor) ⇒ Object
2613 2614 2615 2616 2617 2618 2619 2620 |
# File 'lib/xml/xpath.rb', line 2613 def each(node, visitor) stack = visitor.visit(node).children.reverse while node = stack.pop i = visitor.visit(node) stack.concat i.children.reverse yield i end end |