Mathieu Bouchard wrote:

 > What do you mean exactly by "multiple files and locations" ?

If I generate 10 classes, I'd like to be able to specify if they all go 
into one file, if they each go into one single file, etc.

 >> ... true, it's cleaner, but in contrary to the first version depends 
 >> on indentation.

 > it did _not_.

There must be a misunderstanding. In my version, the indentation doesn't 
matter, but in yours:

-----
def make_getter attr_name
   %{
     def #{attr_name}
     @attributes['#{attr_name}'].to_s.to_number
     end
   }
end

print make_getter 'foo'

-----

gives

-----

     def foo
     @attributes['foo'].to_s.to_number
     end

-----

but

-----
def make_getter attr_name
%{
def #{attr_name}
@attributes['#{attr_name}'].to_s.to_number
end
}
end

print make_getter 'foo'
-----

gives

-----

def foo
@attributes['foo'].to_s.to_number
end

-----

That's what I meant.

 > XML is tedious, at least for representing programs.

I meant it looks tedious to generate programs, with all the ]]]]]s. 
Anyways: No matter what the internal representation is, I can imagine 
convenient methods for manipulating the "code tree", easy and REXML-like.

 > Yes. But it has to work first, and I'm not there yet. =)

I'm looking forward to using it :)

Tobi

-- 
http://www.pinkjuice.com/