Class: DotGraph
- Defined in:
- lib/rpdf2txt-rockit/graphviz_dot.rb,
lib/rpdf2txt-rockit/graphviz_dot.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
Instance Method Summary collapse
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description
52 53 54 |
# File 'lib/rpdf2txt-rockit/graphviz_dot.rb', line 52 def description @description end |
Instance Method Details
#write_to_file(filename) ⇒ Object
54 55 56 57 58 59 60 61 62 |
# File 'lib/rpdf2txt-rockit/graphviz_dot.rb', line 54 def write_to_file(filename) tmpfile = filename + rand(100000).inspect while test(?f, tmpfile) tmpfile = filename + rand(100000).inspect end File.open(tmpfile, "w") {|f| f.write description} system "dot -Tps -o #{filename} #{tmpfile}" File.delete(tmpfile) end |