From: gz zz Date: 2007-06-16T14:13:06+09:00 Subject: Re: Dynamic Class Initialization Peer Allan wrote: > Hi all, > I know this can be done, but I can't find out how to do it. I have a > string with the name of the class that I want to initialize, but how do > I do it? > > This is what I tried, > > class = "Product" > product = class.new > > Obviously this does not work or I wouldn't be asking :) So, how do I do > this? > > Peer hello,may this can work :) product=eval("Product").new -- Posted via http://www.ruby-forum.com/.