Class: GraphViz::Parser::Options

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/graphviz/parser.rb

Instance Method Summary collapse

Instance Method Details

#evalObject



220
221
222
223
224
225
226
227
228
229
230
# File 'lib/graphviz/parser.rb', line 220

def eval
  options = {}
  elements[2].elements.each do |e|
    # puts "  #{e.elements[0].text_value} = #{e.elements[4].text_value}"
    options[e.elements[0].text_value] = e.elements[4].text_value.gsub( /"/, "" )
  end
  # puts "  #{elements[3].text_value} = #{elements[7].text_value}"
  options[elements[3].text_value] = elements[7].text_value.gsub( /"/, "" )
    
  return options
end