# File lib/hirb/helpers/parent_child_tree.rb, line 9 def render(root_node, options={}) value_method = options[:value_method] || (root_node.respond_to?(:name) ? :name : :object_id) @value_method = value_method.is_a?(Proc) ? value_method : lambda {|n| n.send(value_method) } children_method = options[:children_method] || :children @children_method = children_method.is_a?(Proc) ? children_method : lambda {|n| n.send(children_method)} @nodes = [] build_node(root_node, 0) super(@nodes, options) end