class RGL::DOT::Subgraph

A subgraph is a nested graph element and is the same as a Graph except that its header in dot notation has an identifier of subgraph instead of graph.

Public Class Methods

new(params = {}, option_list = GRAPH_OPTS) click to toggle source

Creates a new Subgraph with the params Hash providing settings for all graph options. The option_list parameter restricts those options to 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.

Calls superclass method RGL::DOT::Graph::new
    # File lib/rgl/rdot.rb
407 def initialize(params = {}, option_list = GRAPH_OPTS)
408   super(params, option_list)
409   @dot_string = 'subgraph'
410 end