Sha256: c5fb8d4fee078e36da9af8a939311bc0638c6eaa24200271764f15fdc2a63d7c

Contents?: true

Size: 350 Bytes

Versions: 23

Compression:

Stored size: 350 Bytes

Contents

#!/usr/bin/ruby -w

require 'graph'

digraph do
  # many ways to access/create edges and nodes
  edge "a", "b"
  self["b"]["c"]
  node("c") >> "a"

  square   << node("a")
  triangle << node("b")

  red   << node("a") << edge("a", "b")
  green << node("b") << edge("b", "c")
  blue  << node("c") << edge("c", "a")

  save "simple_example", "png"
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
graph-2.11.1 gallery/simple_example.rb
graph-2.11.0 gallery/simple_example.rb
graph-2.10.0 gallery/simple_example.rb
graph-2.9.1 gallery/simple_example.rb
graph-2.9.0 gallery/simple_example.rb
graph-2.8.2 gallery/simple_example.rb
graph-2.8.1 gallery/simple_example.rb
graph-2.8.0 gallery/simple_example.rb
graph-2.7.1 gallery/simple_example.rb
graph-2.7.0 gallery/simple_example.rb
graph-2.6.0 gallery/simple_example.rb
graph-2.5.3 gallery/simple_example.rb
graph-2.5.2 gallery/simple_example.rb
graph-2.5.1 gallery/simple_example.rb
graph-2.5.0 gallery/simple_example.rb
graph-2.4.1 gallery/simple_example.rb
graph-2.4.0 gallery/simple_example.rb
graph-2.3.1 gallery/simple_example.rb
graph-2.3.0 gallery/simple_example.rb
graph-2.2.0 gallery/simple_example.rb