From: Nicholas Wieland Date: 2005-05-24T15:56:50+09:00 Subject: Re: Determining what file contains a module/class - Austin Ziegler : > On 5/21/05, Nicholas Wieland wrote: > > Hi *, > > I need to find the file that contains a known module or class, to > > "inspect" the source code and extract what I need from the file. > > Something like: > > > > >> require 'digest' > > >> Digest::base_file > > '/usr/local/lib/ruby/1.8/digest.rb' > > The problem in this case is that digest is specifically in digest.so, > not digest.rb. It also doesn't help if a module or class is defined > across multiple files, which is certainly permitted in Ruby. Well, I've used digest just to make an example, my question was more general :=) Actually I'm using something like: SCRIPT_LINES__ = {} require 'net/ftp' SCRIPT_LINES__.keys that solves two problems in one. TIA, ngw -- checking for life_signs in -lKenny... no Oh my god, make (1) killed Kenny ! You, bastards ! nicholas_wieland-at-yahoo-dot-it ___________________________________ Nuovo Yahoo! Messenger: E' molto pi� divertente: Audibles, Avatar, Webcam, Giochi, Rubrica� Scaricalo ora! http://it.messenger.yahoo.it