class Async::Node
def traverse(level = 0, &block)
- Yield: - The node and the level relative to the given root.
def traverse(level = 0, &block) yield self, level @children.each do |child| child.traverse(level + 1, &block) end end
def traverse(level = 0, &block) yield self, level @children.each do |child| child.traverse(level + 1, &block) end end