On Thu, 8 May 2003 10:46:43 +0900, Yukihiro Matsumoto wrote:
> Gavin Sinclair <gsinclair / soyabean.com.au> writes:
>> How about a single method "methods" that takes arguments:
>> 
>> methods(:instance)
>> methods(:private, :instance)
>> methods(:public, :class)
>> methods(:singleton)
>> 
>> etc.
> I don't feel dispatching features by argument is good idea.

I'm not sure that this is "dispatching features" so much as
"filtering". I don't know that I care for Gavin's suggested way, but
I think it would be nicer to have a single method for determining
the methods available to a class and then filtering on this. The
existing *method* methods would be specialised calls to these.

  #methods(filter_conditions = :all, recursion_depth = 0)

Thus, if I wanted the public cliass methods for this class and its
immediate parent, I could call the existing method, or I could set
up my own filter:

  #methods([:public, :class], 1)

I'm not sure if the filter conditions or the recursion depth should
be first, but I think that this is overall a good idea.

-austin
-- Austin Ziegler, austin / halostatue.ca on 2003.05.08 at 08:49:32