On Thu, 17 Jan 2002, Tobias Reif wrote:
> Mathieu Bouchard wrote:
> > Well, that's something you can specify when you eval() the result.
> I'm confused. I thought I specify that when I do .to_string, or to_pp, 
> .write, or .serialize the constructed code; not when I eval it.

Sorry, *I* am confused. To answer your question, you can split a tree
'manually'; if the toplevel element is a body containing only class defs,
then you can pick all of those subtrees and pretty-print them manually. I 
expect all the pretty-printers to take an argument of the IO class, and
that's what I had done with the ToSource subpackage of MetaRuby.

> But because I'm generating the code from a large schema, which I don't 
> want to read in each time I want to use the generated lib (takes a 
> while), I stay with writing the lib to a file.

(btw, a schema is a specification for a kind of documents; it's not the
documents themselves.)

________________________________________________________________
Mathieu Bouchard                   http://hostname.2y.net/~matju