# File lib/puppet/vendor/rgen/test/xml_instantiator_test.rb, line 60 def calc_max_depth(node, offset) if node.children.nil? || node.children.size == 0 @max_depth = offset if offset > @max_depth else node.children.each do |c| calc_max_depth(c, offset+1) end end end
# File lib/puppet/vendor/rgen/test/xml_instantiator_test.rb, line 56 def on_ascent(node) calc_max_depth(node, 0) end
# File lib/puppet/vendor/rgen/test/xml_instantiator_test.rb, line 53 def on_descent(node) end
# File lib/puppet/vendor/rgen/test/xml_instantiator_test.rb, line 48 def initialize(env) super(env) @max_depth = 0 end