Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.