lib/dogviz/graphviz_renderer.rb in dogviz-0.0.21 vs lib/dogviz/graphviz_renderer.rb in dogviz-0.0.22

- old
+ new

@@ -4,12 +4,18 @@ module Dogviz class GraphvizRenderer attr_reader :graph def initialize(title, hints) - @graph = GraphViz.digraph(title) - @graph[hints] + construction_hints = {} + after_hints = hints.clone + if hints.has_key?(:use) + construction_hints[:use] = hints[:use] + after_hints.delete :use + end + @graph = GraphViz.digraph(title, construction_hints) + @graph[after_hints] @subgraphs = {} @nodes = {} @rendered_subgraph_ids = {} end @@ -23,10 +29,10 @@ def render_node(parent, id, attributes) clean_node_attributes attributes default_attributes = {:shape => 'box', :style => ''} merged_attributes = default_attributes.merge(attributes) - node = parent_node(parent).add_nodes(id, merged_attributes) + parent_node(parent).add_nodes(id, merged_attributes) end def render_subgraph(parent, id, attributes) if (attributes[:bounded] == true) then rendered_id = 'cluster_' + id \ No newline at end of file