Class | GraphViz::Edge
In: | lib/graphviz/edge.rb
Parent: | Object

### Methods

[] []= each_attribut head_node index new node_one node_two root_graph set tail_node

### Included Modules

Constants

### External Aliases

<< | -> | >
<< | -> | -
<< | -> | >>

### Public Class methods

new( vNodeOne, vNodeTwo, oGParrent )

Create a new edge

In:

- vNodeOne : First node (can be a GraphViz::Node or a node ID)
- vNodeTwo : Second node (can be a GraphViz::Node or a node ID)
- oGParrent : Graph

### Public Instance methods

[]( xAttrName )

Set values for edge attributs or get the value of the given edge attribut `xAttrName`

[]=( xAttrName, xAttrValue )

Set value `xAttrValue` to the edge attribut `xAttrName`

each_attribut(global = true) {|k,v| ...}

Calls block once for each attribut of the edge, passing the name and value to the block as a two-element array.

If global is set to false, the block does not receive the attributs set globally

head_node( with_port = true )

Alias for node_two

index()

Return the index of the edge

node_one( with_port = true )

Return the node one as string (so with port if any)

node_two( with_port = true )

Return the node two as string (so with port if any)

root_graph()

Return the root graph

set( ) {|self| ...}

Set edge attributs

Example :

      e = graph.add_edge( ... )
      ...
      e.set { |_e|
        _e.color = "blue"
        _e.fontcolor = "red"
      }

tail_node( with_port = true )

Alias for node_one

[Validate]