lib/graphviz/dot2ruby.rb in ruby-graphviz-1.0.0 vs lib/graphviz/dot2ruby.rb in ruby-graphviz-1.0.1
- old
+ new
@@ -45,6 +45,15 @@
xCmd = "#{@xGvprPath} -f #{@gvprScript} -a \"-\" #{xFile}"
xOutput = output_from_command( xCmd )
instance_eval(xOutput)
return @_graph_eval
end
+
+ def eval_string( data ) #:nodoc:
+ t = Tempfile::open( File.basename(__FILE__) )
+ t.print( data )
+ t.close
+ result = self.eval(t.path)
+ t.close
+ return result
+ end
end