From: Damjan Rems Date: 2008-03-03T20:52:15+09:00 Subject: Re: Understanding ruby classes One brainstorm later. Suppose I have a function (myReport) which would initialize the proper formater object and act as MyPrint001 is actualy defined as ex. 'class MyPrint001 < MyPrint2PDF'. class MyPrint001 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={}) .. do whatever must be done and I don't know how to do it end myReport('MyPrint001', :format => 'PDF') by TheR -- Posted via http://www.ruby-forum.com/.