module Constree
Constants
- Node
- VERSION
Public Class Methods
list(node, seen=[])
click to toggle source
# File lib/constree.rb, line 8 def list node, seen=[] node = Node.new node unless node.is_a? Node seen << node if seen.empty? node.sub_nodes.each do |sub_n| seen << sub_n node.children_for_tree_graph << sub_n list(sub_n, seen) if sub_n.not_yet? seen end seen end
of(mod)
click to toggle source
# File lib/constree.rb, line 21 def of mod list(mod).first.tree_graph end
p(mod)
click to toggle source
# File lib/constree.rb, line 25 def p mod puts of mod end