Class: GraphViz::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/org-parse/visitor.rb

Class Method Summary collapse

Class Method Details

.parse_str(str, *hOpts) {|graph| ... } ⇒ Object

Yields:

  • (graph)


12
13
14
15
16
17
18
# File 'lib/org-parse/visitor.rb', line 12

def self.parse_str(str, *hOpts, &block)
  parser = DotParser.new()
  tree = parser.parse(str)
  graph = tree.eval( GraphViz::Parser::Context.new(),  hOpts )
  yield( graph ) if( block and graph.nil? == false )
  return graph
end