Sha256: 69b9aaa8418fbc6702210cc12e4ecbb48a461692c993171f829e20f2ba17444d

Contents?: true

Size: 1.07 KB

Versions: 29

Compression:

Stored size: 1.07 KB

Contents

$:.unshift( "../lib" );
require "graphviz"

GraphViz::new( "G", :rankdir => "LR", :type => "graph" ) { |graph|
  graph.cluster0 { |cluster|
    cluster[:label] = "Back Office"
    
    cluster.fatman.set { |n|
      n.label = "FatMan"
      n.shape = "rect"
    }
    cluster.grobil.set { |n|
      n.label = "GroBil"
      n.shape = "rect"
    }
  }
  
  graph.cluster1 { |cluster|
    cluster[:label] = "DMZ"
    
    cluster.dupont.set { |n|
      n.label = "Dupont"
      n.shape = "rect"
    }
    cluster.dupond.set { |n|
      n.label = "Dupond"
      n.shape = "rect"
    }
  }

  graph.cluster2() { |cluster|
    cluster[:label] = "Front Office"
    
    cluster.door.set { |n|
      n.label = "Door"
      n.shape = "rect"
    }
  }
  
  graph.cluster0.fatman << graph.cluster1.dupont
  graph.cluster0.fatman << graph.cluster1.dupond
  graph.cluster0.grobil << graph.cluster1.dupont
  graph.cluster0.grobil << graph.cluster1.dupond
  graph.cluster1.dupont << graph.cluster2.door
  graph.cluster1.dupond << graph.cluster2.door
}.output( :path => '/usr/local/bin/', :png => "#{$0}.png" )

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
ruby-graphviz-0.9.9 examples/sample06.rb
ruby-graphviz-0.9.8 examples/sample06.rb
ruby-graphviz-0.9.7 examples/sample06.rb
ruby-graphviz-0.9.6 examples/sample06.rb
ruby-graphviz-0.9.5 examples/sample06.rb
ruby-graphviz-0.9.4 examples/sample06.rb
ruby-graphviz-0.9.3 examples/sample06.rb
ruby-graphviz-0.9.2 examples/sample06.rb
ruby-graphviz-0.9.1 examples/sample06.rb