From: Jon Hart Date: 2012-01-05T07:16:31+09:00 Subject: Re: Including/selecting modules based on the methods they define --f46d04339dd6c09a9b04b5bb2aa7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2012/1/4 Bartosz Dziewo=C5=84ski > > But you do in fact know the module name (as long as it's consistent > with the file name): > > irb(main):013:0> vendor, product =3D 'foo', 'bar' > irb(main):019:0> module =3D > Go.const_get(vendor.capitalize).const_get(product.capitalize) > =3D> Go::Foo::Bar > > I think you'll be able to work from here :) > Interesting. This gets me close, but for Go::Foo::Bar to be visible, I first have to require that plugin. I'm looking to avoid loading every plugin unless absolutely necessary, because I have this fear that there is a performance hit that I'll incur by loading every plugin and including its namespace. In my example, I only have two plugins, but in reality there can be dozens or hundreds. Thanks, -jon --f46d04339dd6c09a9b04b5bb2aa7--