From: ES Date: 2005-02-21T06:22:41+09:00 Subject: Re: Getting a method or class within a file Asfand Yar Qazi wrote: > Austin Ziegler wrote: > >>> >>> But then I'll have to store 2 entries: filename and module name. But >>> I suppose that's ok. Perhaps I should use the following syntax: >>> >>> Module@path/to/file.rb >>> >>> to show that a module is in a certain file? >> >> >> >> It sounds like you're basically doing a plugin framework. > > > I want to be able to load up objects 'on demand', i.e. when they're > needed and not before. In a very simple way, nothing fancy. Kernel#autoload might be of use if you have a discrete set of files? >> >> Ruwiki uses something like this when reading its Token classes. Look >> at lib/ruwiki/wiki/tokens.rb to see how I do it. >> >> There is a plugin framework (FreeBASE) that may also be suitable for >> you in this instance. >> > > Ah, thanks I'll take a look. E