From: Matt Gretton Date: 2007-05-23T00:53:47+09:00 Subject: Re: Dynamically creating ruby source files Hello all, Thank you to all who have replied to my post so far. It is very much appreciated. When I posted my initial question I had a specific goal in mind. That is the ability to automatically create code templates with relevant includes/requires/example classes/modules/methods. I also wanted to use the technique to create test cases specific to the code project I am working on. In the end I have written (well almost it's almost finished...) a class to assist with the dynamic creation of files containing ruby code. It models the code structure as a tree to make the construction of the code as straightforward as possible (you can add method nodes to your module nodes etc...). It is then easy to convert the tree to a string and write the string to a file! I'm happy to post the finished class if anyone is interested but in all honesty it's quite basic. Still, when it is finished it'll serve my purposes perfectly! Thanks again, Matt. -- Posted via http://www.ruby-forum.com/.