From: Christoph Date: 2005-02-20T08:11:22+09:00 Subject: Re: Dynamically loading and executing within a new module? Lloyd Zusman schrieb: >However, the "eval fname.capitalize" part doesn't create a new module, >and that's part of what is confusing me about all this. Given a string >"Foo", what do I do to it in order to create a module object with that >name? > > use Module#new - for example --- MyNameSpace.const_set fname.capitalize, Module.new --- You can automate things class MyModule < Module def initialize(fname) ::MyNameSpace.const_set fname.capitalize, self # maybe add the the MyModule method # using the text file .... end end /Christoph