lib/graphshaper/adapters/dot_adapter.rb in graphshaper-0.2.2 vs lib/graphshaper/adapters/dot_adapter.rb in graphshaper-0.2.3

- old
+ new

@@ -3,18 +3,19 @@ def initialize(output_file) @output_file = output_file @output_file << "digraph genereated_graph { \n rankdir=LR;\n node [shape = circle];\n edge [dir=none];\n" end - def close - @output_file << "}" - end - def add_edge(edge_id, in_id, out_id) @output_file << " #{in_id} -> #{out_id} [ label = \"#{edge_id}\" ];\n" end def add_vertex(vertex_id) @output_file << " #{vertex_id};\n" + end + + def close + @output_file << "}" + @output_file.close end end end \ No newline at end of file