Create dynamic controller????

Hi All,
       I wanna create controller dynamically through my ruby code.

Please help me out.

Suppose i have one controller if i call a function of this controller so
i wanna create another controller dynamically.That can be one or n
numbers of controllers.

Please help me ............
Thanks
Varun

You want to write code dynamically? I don't think that's going to be
very easy to do.... unless you just output files to your webserver,
then restart your server each time?

I doubt very much this would be doable... would it?

This type of requirement seems to me to be the result of a bad design
decision. Perhaps the first step would be telling us what requirement is
causing you to want to write controllers dynamically.