Class DOT::DOTGraph
In: lib/rgl/rdot.rb
Parent: DOTElement

A graph representation. Whether or not it is rendered as directed or undirected depends on which of the programs dot or neato is used to process and render the graph.

Methods

<<   each_element   new   pop   push   to_s  

Public Class methods

Creates a new DOTGraph with the params Hash providing settings for all graph options. The option_list parameter restricts those options to the list of valid names it contains. The exception to this is the elements option which, if specified, must be an Enumerable containing a list of nodes, edges, and/or subgraphs.

Public Instance methods

Adds a new node, edge, or subgraph to this graph.

Calls block once for each node, edge, or subgraph contained by this graph, passing the node, edge, or subgraph to the block.

Removes the most recently added node, edge, or subgraph from this graph and returns it.

push(element)

Alias for #<<

Returns a string representation of this graph which is consumable by the graphviz tools dot and neato. The leader parameter is used to indent every line of the returned string, and the indent parameter is used to additionally indent nested items.

[Validate]