From: Andreas Schwarz Date: 2004-03-26T05:14:25+09:00 Subject: Re: [ANN] Kwartz (2004-03-19) released Makoto Kuwata wrote: > Andreas Schwarz >> Thanks for your update, everything seems to work perfectly. >> >> Another suggestion: personally I don't like it to let the template >> access all the local variables. > Analyze: >==================== > $ kwartz -a analyze file.html > global variables: user list > local variables: item >==================== That would make it possible to write a script that generates ruby code like this: module MyTemplate def MyTemplate::expand(data) user = data(:user) list = data(:list) # any other "global" variables needed by the template # ruby code generated by kwartz end end It's certainly ugly, but I can't think of anything else. Or is there a way to set variables from the contents of a hash?