From: Greg Hauptmann Date: 2009-12-08T08:47:11+09:00 Subject: how to understand Ruby code? (noting various mixins/includes) Is there a tool to assist here? Hi, I seem to spend a good deal of time trying to make sense of open source ruby code due to the way it is very dynamic.  There are various code files that are really just ready to be "mixed in" to other files (e.g. with the class methods & instance methods ready to go).  Just trying to make sense of the final object structure and where methods resides seems to be a challenge.  The latest one I've been looking at are things like AuthLogic and Paperclip which are used in the Rails world. QUESTION 1:  Is there a tool that could assist here?  I'm thinking of one that could do things like walk the code base and then: * Give a hierarchy structure where various files methods are loaded into which objects * Perhaps something that analyses code and then added comments to the various files highlighting where that files methods will reside in terms of the final object structure. * Given sample walk throughs of methods hit in which files for a given use case (e.g. like how the java IDEs can auto-sequence diagrams) QUESTION  2: Should of nothing be available for the above, and tips/ tricks people have re understanding a new ruby codebase? (although in particular with a rails bent) thanks