Method: Nokogiri::XML::Node#traverse
- Defined in:
- lib/nokogiri/xml/node.rb
#traverse {|_self| ... } ⇒ Object
Yields self and all children to block
recursively.
1239 1240 1241 1242 |
# File 'lib/nokogiri/xml/node.rb', line 1239 def traverse(&block) children.each { |j| j.traverse(&block) } yield(self) end |