On 6/23/05, Hal Fulton <hal9000 / hypermetrics.com> wrote:
> Austin Ziegler wrote:
> > For nested values, it's:
> >
> >   name = 'Transaction::Simple::Group'
> >   klass = name.split(/::/).inject(Object) { |k, n| k.const_get(n) }
> >   p klass # => Transaction::Simple::Group
> Quite right. There is also the eval (evil?) method:
> 
>    clazz = eval(name)

> BTW, I've wondered why Object.const_get doesn't honor
> the X::Y::Z form. It's unambiguous and I can't see a
> good reason not to decipher it.

RCR?

-austin
-- 
Austin Ziegler * halostatue / gmail.com
               * Alternate: austin / halostatue.ca