class Sanitize

def traverse_depth(node, &block)

document, then traversing upwards to the root.
Performs depth-first traversal, operating first on the deepest nodes in the
def traverse_depth(node, &block)
  node.children.each {|child| traverse_depth(child, &block) }
  block.call(node)
end