Hi,

Am Montag, 17. Jan 2005, 19:54:47 +0900 schrieb Peter Hickman:
> I have a class like this:
> 
> class Builder
>    def Builder.create( klass, data )
>        return klass.new(data)
>    end
> end
> 
> I want to call it as:
> 
> x = Builder.create( "Fred", data )
> 

I just call

  class Fred
    def initialize data
      ...
    end
  end
  x = Builder.create Fred, data

or even

  r = Builder.create Regexp, '.*'

Bertram

-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de