Skip to content

Instantly share code, notes, and snippets.

@sferik
Created June 20, 2013 15:06
Show Gist options
  • Save sferik/5823549 to your computer and use it in GitHub Desktop.
Save sferik/5823549 to your computer and use it in GitHub Desktop.
graph = {}
ObjectSpace.each_object(Class) do |klass|
sup = klass.superclass and graph[klass] = sup
end
puts "digraph{"
graph.map do |key, value|
puts %("#{key}"\n"#{key}"->"#{value}")
end
puts"}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment