From: shasckaw Date: 2004-02-10T01:54:58+09:00 Subject: Re: running a class from the base class It is hard to understand what you really want, but I'll try to help. Perhaps you just need to use some meta-class programming: class SpecificArchitecture < BaseArchitecture def SpecificArchitecture.main(args) ... end end And then you just do: begin SpecificArchitecture.main(ARGV) end It means that you call the main function without instanciation. I think UnitTest do it another way, but I currently don't know how. Lio tim wrote: > Hi > > I have examined the test object from the test unit stuff and i cannot > work out how the base class executes the main test object... i want to > efectively do the same thing. Can anybody give me some tips on how to do > this. Effectively i want to: > > class SpecificArchitecture << BaseArchitecture > def main(args) > .... > end > end > > And when the file is run it just figures out how to make the object and > call into main. I currently have a number of derived classes that all > have something like: > > begin > xx = SpecificArchitecture.new() > xx.main(ARGV) > end > > at the end. Which i would like to remove. > > thanks > Tim >