From: Damjan Rems Date: 2008-03-04T01:52:34+09:00 Subject: Re: Understanding ruby classes Another brainstorm later. This goes to myPrint001.rb class MyPrint001 < MyXXXXClass def printHDR image 'image.jpg' 20, 1 print 'some header text' 1,5 ... end def doJob print 'some text' 1,5 end end def myReport(myCustomClass, opts={}) txt = File.open(myCustomClass + .rb') {|f| f.read} txt.sub('MyXXXXXClass','myPrint2' + opts[:format]) txt.find_out_how_to_evaluate_each_line end myReport('MyPrint001', :format => 'PDF') Althow not tested yet it should work. I have to find the find_out_how_to_evaluate_each_line solution now. by TheR -- Posted via http://www.ruby-forum.com/.