From: "Brian Schröder" Date: 2005-02-18T01:58:06+09:00 Subject: Re: ri needs to tell me what to require On Thu, 17 Feb 2005 23:24:11 +0900 Ben Giddings wrote: > On Feb 17, 2005, at 03:15, Brian Schr�der wrote: > > In principle a +1 from me, but check also: > > > > http://groups.google.de/groups?threadm=6D24974B-123E-11D9-8C3F > > -000A95D2DFAE%40mac.com > > Which says: > > >> Excellent idea. The only problem is that, as things stand, this isn't > >> easily knowable, as the file containing the method definition may not > >> be the one that you end up requiring into your Ruby source. For > >> example, the various YAML methods are defined in files in the yaml/ > >> directory, but you don't require these into your code. Instead you > >> say > >> > >> require "yaml" > >> > >> and it drags them in for you. > > In principle then, the file 'yaml/foo.rb' should contain some kind of > comment saying "hey, if you want the functionality that this file > provides, require 'yaml' not this file". That way people who are > looking at that file in their favourite editor can know how to get > access to those functions. It should be possible to do that in a way > that rdoc can pick up on it, right? > Yes, you could put this comment at the end of the description of each function. But this is a lot of "repeat yourself", and who wants that? So it seems someone has to think about extending rdoc with some new meta commands, create a patch, discuss and standardize it and get it included. Sadly thats more work than I have time, so I just hope that someone else will do this. Not the nice way, but I don't see another possibility. Regards, Brian