From: Matthew Diephouse Date: 2001-11-02T09:19:16+09:00 Subject: [ruby-talk:24127] Dynamic object type from variable OK, this will be easier to describe in code. class A ... method=(class) @var = class.new(self) end end class B ... end class C ... end Ok, basically, I want a method such as A#method that will make a variable an object of a class which I'd like to specify as the param. This would mean that A.method = "B" would make @var an object of class B. Is there any way to do this besides if..elsif's?