Robert Klemme
2/22/2007 7:51:00 AM
On 21.02.2007 21:17, Rich Morin wrote:
> At 4:38 AM +0900 2/22/07, Gary Wright wrote:
>> What other 'entities' did you have in mind? Since
>> almost everything in Ruby is an object, there isn't
>> much left after you've talked about classes, instances,
>> and modules.
>
> My motivation is to extend RDoc's coverage and utility.
> Currently, RDoc presents the following information about
> Ruby entities and relationships:
>
> Names of Classes, Files, and Methods
> Class or Module each Method is defined in
> Comments for files and methods
> Code/comment snippets for each method
>
> I'd like to go in two directions. First, I'd like to add
> coverage of more entities (e.g., Exceptions, Callbacks,
> Variables)
Exceptions are tough since Ruby does not have checked exceptions. And
because of Ruby's dynamic nature it's practically impossible to
determine which exceptions can be thrown by a method.
Callbacks, not sure what you mean here. You can view every block passed
to a method as callback. What do you want to document about this?
Variables: if you refer to local variables I don't see the point in
documenting them. They are completely private to a method and their
names can change without affecting any code outside.
> and relationships (e.g., which method looks for
> which exception).
By "looks" do you mean "has a rescue clause for"? That is certainly
easier to do than determining which exceptions are thrown by a method.
However, I think the latter info is much more useful as it affects the
caller.
> Then, I'd like to store the information
> in a computer-friendly form, such as a set of DB tables,
> so they can be accessed by a Rails app, etc.
To do what? Sorry, I still don't understand what you want to achieve.
Kind regards
robert