lib/webgen/tree.rb in gettalong-webgen-0.5.6.20081020 vs lib/webgen/tree.rb in gettalong-webgen-0.5.7.20090227

- old
+ new

@@ -1,5 +1,7 @@ +# -*- encoding: utf-8 -*- + require 'webgen/websiteaccess' require 'webgen/node' module Webgen @@ -63,9 +65,12 @@ @node_access[:path][node.path] = node end end # Delete the node identified by +node_or_alcn+ and all of its children from the tree. + # + # The message <tt>:before_node_deleted</tt> is sent with the to-be-deleted node before this node + # is actually deleted from the tree. def delete_node(node_or_alcn) n = node_or_alcn.kind_of?(Node) ? node_or_alcn : @node_access[:alcn][node_or_alcn] return if n.nil? || n == @dummy_root n.children.dup.each {|child| delete_node(child)}