Sha256: 886916d1951aa23e304547b10f4d44614fe74dfda7bf4d72b312d064b1f9765d

Contents?: true

Size: 318 Bytes

Versions: 20

Compression:

Stored size: 318 Bytes

Contents

#!/usr/bin/ruby -w

require "graph"

digraph do
  rotate
  boxes

  ObjectSpace.each_object Class do |mod|
    next if mod.name =~ /Errno/
    next unless mod < Exception

    edge mod.superclass.to_s, mod.to_s
  end

  blue << node("StandardError")
  red  << node("RuntimeError")

  save "ruby_exceptions", "png"
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
graph-2.9.1 gallery/ruby_exceptions.rb
graph-2.9.0 gallery/ruby_exceptions.rb
graph-2.8.2 gallery/ruby_exceptions.rb
graph-2.8.1 gallery/ruby_exceptions.rb
graph-2.8.0 gallery/ruby_exceptions.rb
graph-2.7.1 gallery/ruby_exceptions.rb
graph-2.7.0 gallery/ruby_exceptions.rb
graph-2.6.0 gallery/ruby_exceptions.rb
graph-2.5.3 gallery/ruby_exceptions.rb
graph-2.5.2 gallery/ruby_exceptions.rb
graph-2.5.1 gallery/ruby_exceptions.rb
graph-2.5.0 gallery/ruby_exceptions.rb
graph-2.4.1 gallery/ruby_exceptions.rb
graph-2.4.0 gallery/ruby_exceptions.rb
graph-2.3.1 gallery/ruby_exceptions.rb
graph-2.3.0 gallery/ruby_exceptions.rb
graph-2.2.0 gallery/ruby_exceptions.rb
graph-2.1.0 gallery/ruby_exceptions.rb
graph-2.0.1 gallery/ruby_exceptions.rb
graph-2.0.0 gallery/ruby_exceptions.rb