From: Robert Klemme Date: 2004-09-04T01:30:18+09:00 Subject: Re: [Design advice] including a file as code ('as is') "Benny" schrieb im Newsbeitrag news:2pr9lsFoodf3U1@uni-berlin.de... > David A. Black wrote: > > > Anyway, as for another way: you could just 'require' the file, > > although then you end up with the methods being private. But if you > > know what they're called that may be not a big problem: > no, it won't work in my case: > > in the real app 'MyTest' are different classes for each include and all of > them have the same parent class. in this parent class is a method defined to > make a new object of any given 'MyTest'-class (i.e. from another include) > and to invoke a given method of this class. this methods are unknown for > main.rb (execept the one and only "run" method that has to be in the > include). additionally there might be class methods that should be called > this way (without the creation of an object of this class) AFAIK there is a solution for this already in RubyUnit. Maybe the simplest is to just use that. Kind regards robert