[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Working with classname that is stored in a string

Gavin Kistner

8/13/2007 9:38:00 PM

> From: Glen Holcomb [mailto:damnbigman@gmail.com]
> On 8/13/07, Sebastian Hungerecker <sepp2k@googlemail.com> wrote:
> > I believe you are looking for const_get.
> Thanks!

In the Rails world (or ActiveSupport in general), see also the more
robust #constantize method of strings:
http://api.rubyonrails.com/classes/ActiveSupport/CoreExtension...
nflections.html#M000434