Class: RGL::DOT::Subgraph

Inherits:
Graph show all
Defined in:
lib/laser/third_party/rgl/rdot.rb

Overview

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.

Instance Attribute Summary

Attributes inherited from Element

#name, #options

Instance Method Summary collapse

Methods inherited from Graph

#<<, #each_element, #pop, #to_s

Constructor Details

#initialize(params = {}, option_list = GRAPH_OPTS) ⇒ Subgraph

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.



381
382
383
384
# File 'lib/laser/third_party/rgl/rdot.rb', line 381

def initialize (params = {}, option_list = GRAPH_OPTS)
  super(params, option_list)
  @dot_string = 'subgraph'
end