http://objectgraph.rubyforge.org
Added Features:
- Filtering based on common base class
- Filtering based on name-space
What the…?
···
==========
A simple script that generates a graph of the ruby class hierarchy.
The script relies on GraphViz for generation of the PNG and HTML map
files.
Take a look at http://objectgraph.rubyforge.org for some samples,
including
a useful (I hope example of the Exception Class Hierarchy.
Why?
Because it’s neat. And because the online PickAxe seems to be missing
some graphs. And because many nubys (myself included) don’t always know
the Exception inheritance hierarchy. And because I was home sick and
needed something to do (which is a nice excuse why the code may not be
all that great :).
Features:
- Supports multiple layout engines (dot, neato, twopi and circo).
- Supports multiple output formats by GraphViz (PNG, JPEG etc.)
- Errno::… classes can be omitted.
- Classes can be filtered based on common base class or name space.
- Clicking on a class node should go to the ruby-doc.org documentation
for that class.
Installation:
- Install GraphViz and make sure that the executables are on the path.
- Get the graph.rb file. (Sorry, CVS only at this stage.)
- Call “ruby graph.rb …” (usage info at home page)
- Look at the pretty pictures :). Hint: open the HTML page to get the
links.