From: Phy Prabab Date: 2008-10-20T03:20:36+09:00 Subject: Re: Using a result as a constant object? Brian, Ah, I see now (said the blind man)! This cool! Thanks for the example, much appreciated! Cheers, Phy --- On Sun, 10/19/08, Brian Candler wrote: > From: Brian Candler > Subject: Re: Using a result as a constant object? > To: "ruby-talk ML" > Date: Sunday, October 19, 2008, 1:03 PM > Phy Prabab wrote: > > I am trying to understand how I can use a return from > a method as a > > constant name for a class. > > def get_name > "Foo" > end > > n = get_name > c = Class.new(ActiveRecord::Base) # superclass > Object.const_set(n, c) > -- > Posted via http://www.ruby-forum.com/. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com