From: Mike Campbell Date: 2003-06-22T23:01:54+09:00 Subject: Re: [Q] How to test if a file exists? > Well, try it for yourself. Let's say you wanted the methods for a Proc > object. Here's ri's output > > ------------------------------------------------------------------------ > [], arity, binding, call, new, to_proc, yield > ------------------------------------------------------------------------ > > and here is what you're asking for: > > ------------------------------------------------------------------------ > == === =~ [] __id__ __send__ arity binding call class clone display > dup eql? equal? extend freeze frozen? hash id inspect instance_eval > instance_of? instance_variable_get instance_variable_set > instance_variables is_a? kind_of? method methods nil? object_id > private_methods protected_methods public_methods respond_to? send > singleton_methods taint tainted? to_a to_proc to_s type untaint yield > ------------------------------------------------------------------------ > > > (Note that both of these are slightly out of date wrt 1.8: 'yield' no > longer exists as a method of Proc) > > It just seemed to me when I was writing ri that the former was a clearer > picture of the essence of 'Proc'. However, I'm very open to suggestions > here. 2 suggestions (not of mine) that have come up on the list both indicate a flag to get the latter display you show. For me, I'd prefer something like the javadoc thing; you get your "this class only" list, then a list of what this class gets as a result of inherited/mixed in things. Ideally, 1 list per superclass/included class so you can see where to go to get more information on those methods.