Commits

Sidharth Kuruvila committed 5f5989e

Moved the graph method into TreeWrapper

Comments (0)

Files changed (1)

src/main/scala/net/kuruvila/graphviz/DrawSimpleTree.scala

   def nodes: List[Statement] = nodeId.attr(nodeAttributes:_*) :: children.flatMap(_.nodes)
   def connections: List[Statement] = children.flatMap(_.connections(nodeId))
   def connections(parentId: Id): List[Statement] = (parentId --> nodeId)::children.flatMap(_.connections(nodeId))
-  
-}
-
-class SimpleTreeGraph[T](tree: TreeWrapper[T]){
   def graph: Digraph = digraph(tree.nodes ++ tree.connections: _*)
 }