Google

def write( output, indent=-1, transitive=false ) @children.each { |node| node.write( output, indent, transitive ) output << "\n" unless indent<0 or node == @children[-1] } end