On Tue, 28 Sep 2004 16:49:21 +0900, Robert Klemme <bob.news / gmx.net> wrote:
> 
> "trans. (T. Onoma)" <transami / runbox.com> schrieb im Newsbeitrag
> news:200409272111.15070.transami / runbox.com...
> 
> 
> > On Monday 27 September 2004 08:09 pm, David A. Black wrote:
> > > If so, I hope it won't have the boolean flag.  I think those flags,
> > > such as instance_methods(false), etc., are the most obscure, cryptic
> > > thing in Ruby.  I'd like to see them disappear.
> >
> > Actually, I agree with you too. Since it's just a flag, perhaps using
> > meaningful symbols would be better?
> >
> >   methods(:public)
> >   methods(:private)
> >   methods(:protected)
> >
> >   methods(:no_ancestors)
> >   methods(:ancestors_only)
> >
> >   methods(:class)        # same as self.class.methods ?
> >   methods(:singleton)
> >
> > And they could be combined:
> >
> >   methods(:private, :protected)
> >   methods(:singleton, :private)
> >   methods(:private, :no_ancestors)
> 
> Combining the results is the only advantage of this approach. Still I
> prefer simple and short method implementations (which are less error prone
> and often more efficient).  So if you use symbols, change method names:
> 
> public_methods()
> private_methods()
> protected_methods()
> 
> local_methods()
> inherited_methods()
> 
> drop:  methods(:class)        # same as self.class.methods ?
> 
> singleton_methods()
> 
> You can still combine these by concatenating invocation results.  I think
> usually this is not necessary

This sounds like a lovely RCR candidate, Robert :)

-austin
-- 
Austin Ziegler * halostatue / gmail.com
               * Alternate: austin / halostatue.ca
: as of this email, I have [ 6 ] Gmail invitations