P
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 )
and get a object of type Fred.
I'm sure you can see what I am trying to do but for the life of me I
can't get the syntax correct.
class Builder
def Builder.create( klass, data )
return klass.new(data)
end
end
I want to call it as:
x = Builder.create( "Fred", data )
and get a object of type Fred.
I'm sure you can see what I am trying to do but for the life of me I
can't get the syntax correct.