2008/2/19 Radosw Bu„Šat <radek.bulat / gmail.com>:

> For example, when I want to find what methods are in controller
> instance (rails) I can't just go to ActionController::Base and list
> all methods because that class has many included modules (and many of
> them are included outside class). I'm not complaining about Ruby
> itself, rather about programmers :).

I agree. I very often have to read a library author's code to see how
to use things. Though I am not complaining about Ruby or the programmers -
I'm more interested in ways people use to overcome these problems.

For example, perhaps people make probe objects and send them in to
record the methods that the target function tries to call on them.
But that doesn't help too much because behavior changes based on
the spy object's responses.

Perhaps there's a way to use the Ruby parser, or an intelligent interpreter
to enumerate most of the methods a that will be called on a parameter.

Les