Yes you can put the generator anywhere and get the script/generate code to explicitly point to it. We use this for the test framework.
The class is RubiGen::PathSource
See the run_generator test helper as an example. Something like:
source = PathSource.new(:local, File.join(File.dirname(__FILE__), '../path/to/generator/parent/folder)
and then set everything up with:
RubiGen::Base.reset_sources
RubiGen::Base.prepend_sources(source)
Then run the generator with:
RubiGen::Base.instance(name, params, options)
This way you can get your code to invoke a local generator.
Nic