Class: CooCoo::Dot::Graph::Edge

Inherits:
Object
  • Object
show all
Defined in:
lib/coo-coo/dot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(nodes, options = {}) ⇒ Edge

Returns a new instance of Edge.



28
29
30
31
# File 'lib/coo-coo/dot.rb', line 28

def initialize(nodes, options = {})
  @options = options
  @nodes = nodes.dup
end

Instance Attribute Details

#nodesObject (readonly)

Returns the value of attribute nodes.



26
27
28
# File 'lib/coo-coo/dot.rb', line 26

def nodes
  @nodes
end

#optionsObject (readonly)

Returns the value of attribute options.



25
26
27
# File 'lib/coo-coo/dot.rb', line 25

def options
  @options
end

Instance Method Details

#add_node(node) ⇒ Object



33
34
35
36
# File 'lib/coo-coo/dot.rb', line 33

def add_node(node)
  @nodes << node
  self
end