From: Sam Roberts Date: 2004-04-23T01:34:22+09:00 Subject: Re: how to get ri/rdoc working for [user-installed libraries] Wrote Dave Thomas , on Thu, Apr 22, 2004 at 10:22:14PM +0900: > > On Apr 22, 2004, at 3:03, Gavin Sinclair wrote: > > >That's definitely in our TODO. We haven't fleshed it out, but I > >believe a > >sensible system would require a change to ri. If you have 100 gems > >installed, and run 'ri --classes', I'm sure you don't want to see 1000 > >classes. > > > > Why not? I agree, if you ask for --classes, you should see all classes. > >So a more sensible use case (IMO) is: > > > > ri --gem log4r # Shows all relevant classes > > ri --gem log4r Log4r # Searches class/method within log4r space > > > > ri --search to_i # Global search But, if you don't want to see all classes, you should have a way to limit, but by gem doesn't make much sense to me. If I wanted to browse only in a particular package, I would be looking at the rdoc output for that package. I think being able to limit ri by module/ruby namespace would be interesting, so ri --classes Logger would show you all the classes in Logger. Maybe even ri --classes nil would show you all top-level classes. Probably this wouldn't be the --classes option, it maybe would have to be different. > I'm afraid I disagree 100% with this. gems are ways of getting code > into the box, but in their users' minds that's it. In this user's mind that should true, but it isn't now. There's currently a little wrinkle - they aren't just a way of getting code into the box, any user of a gem has to know it got into the box as a gem, and change their require 'package' to require_gem 'package' Coincidentally, I've been chatting with Gavin about this over email, he suggested that it might be possible to get the "traditional" ruby require to work with gems. Cheers, Sam -- Sam Roberts