From: Hugh Sasse Staff Elec Eng Date: 2001-11-23T01:32:25+09:00 Subject: [ruby-talk:26156] Re: Passing class names to constructors. On Fri, 23 Nov 2001, Kevin Smith wrote: > Here's my attempt. > > Kevin > > --- [...] > def factory(text, klass=Upper) > return klass.new(text) > end > > a = factory('Hello') > b = factory('Hello', Lower) > Oh, pass the actual constant itself. That is even more readable. Thank you Hugh