Skip to content

MethodTrails Demo at RailsConf

I just gave a quick talk about MethodTrails at RailsConf 2008.

MethodTrails visualizes the method call graph of Ruby source code. It generates a dot file that can be viewed with Graphviz. It requires Ruby 1.9, which gives you a great excuse to download the latest Ruby and see what it is all about. MethodTrails uses Ruby 1.9’s Ripper to parse any Ruby file into an s-expression. Then it explores the s-expression to find the information it needs to build up the dot file. It does so by using a rule engine, so very little in MethodTrails is hard coded. Tweak it and play around if you want to extract different information.

Here is a sample visualization of Merb’s awesome router (router.rb):

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*