L
Luke Kanies
Hi all,
I'm dynamically loading some ruby files, and those files need to call
a method on a module of mine. E.g., in this case, the method is
Puppet:arser::Functions.newfunction, and the files are autoloaded
from 'puppet/parser/functions/<funcname>.rb'.
I'd like to load the files in a way that 'newfunction' could be
called without the full path to Puppet:arser::Functions.; they call
'newfunction', and it correctly resolves to the Functions module.
Is there a way to load a file within an existing namespace, so that
the method search path started at the scope doing the loading?
Thanks,
Luke
I'm dynamically loading some ruby files, and those files need to call
a method on a module of mine. E.g., in this case, the method is
Puppet:arser::Functions.newfunction, and the files are autoloaded
from 'puppet/parser/functions/<funcname>.rb'.
I'd like to load the files in a way that 'newfunction' could be
called without the full path to Puppet:arser::Functions.; they call
'newfunction', and it correctly resolves to the Functions module.
Is there a way to load a file within an existing namespace, so that
the method search path started at the scope doing the loading?
Thanks,
Luke