From: Ryan Davis Date: 2012-08-29T03:34:32+09:00 Subject: Re: dynamic class resolution? You probably want to look at const_missing. Watch out and make sure you always call super because rails uses it to be lazy about requires. On Aug 28, 2012, at 8:41, Gary Weaver wrote: > But, I was just curious- is there an existing way to hook into Ruby such > that you can say something like "if anyone asks for a classname that > ends in 'Ref' then take the class matching the first part of the name > and include or extend this and that"? Then you wouldn't even have to > define the *Ref classes- they would be created and instantiated > dynamically.