Class: GraphViz::Parser::Context

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

Instance Method Summary collapse

Constructor Details

#initializeContext

Returns a new instance of Context.



10
11
12
13
14
15
16
17
18
# File 'lib/graphviz/parser.rb', line 10

def initialize
  @graph = nil
  @nodes = {}
  @edges = []
  @options = {
    :node => {},
    :edge => {}
  }
end

Instance Method Details

#edgesObject



32
33
34
# File 'lib/graphviz/parser.rb', line 32

def edges
  @edges
end

#graphObject



20
21
22
# File 'lib/graphviz/parser.rb', line 20

def graph
  @graph
end

#graph=(g) ⇒ Object



24
25
26
# File 'lib/graphviz/parser.rb', line 24

def graph=(g)
  @graph = g
end

#nodesObject



28
29
30
# File 'lib/graphviz/parser.rb', line 28

def nodes
  @nodes
end

#optionsObject



36
37
38
# File 'lib/graphviz/parser.rb', line 36

def options
  @options
end

#options=(o) ⇒ Object



40
41
42
# File 'lib/graphviz/parser.rb', line 40

def options=(o)
  @options = o
end