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-1.0.7 examples/sample06.rb
ruby-graphviz-1.0.6 examples/sample06.rb
ruby-graphviz-1.0.5 examples/sample06.rb
ruby-graphviz-1.0.4 examples/sample06.rb
ruby-graphviz-1.0.3 examples/sample06.rb
ruby-graphviz-1.0.2 examples/sample06.rb
ruby-graphviz-1.0.1 examples/sample06.rb
ruby-graphviz-1.0.0 examples/sample06.rb
ruby-graphviz-0.9.21 examples/sample06.rb
ruby-graphviz-0.9.20 examples/sample06.rb
ruby-graphviz-0.9.19 examples/sample06.rb
ruby-graphviz-0.9.18 examples/sample06.rb
ruby-graphviz-0.9.17 examples/sample06.rb
ruby-graphviz-0.9.16 examples/sample06.rb
ruby-graphviz-0.9.15 examples/sample06.rb
ruby-graphviz-0.9.14 examples/sample06.rb
ruby-graphviz-0.9.13 examples/sample06.rb
ruby-graphviz-0.9.12 examples/sample06.rb
ruby-graphviz-0.9.11 examples/sample06.rb
ruby-graphviz-0.9.10 examples/sample06.rb