From: Andreas Schwarz Date: 2004-03-31T04:04:24+09:00 Subject: Re: [ANN] Kwartz (2004-03-19) released Makoto Kuwata wrote: > Andreas Schwarz wrote: >>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? > > > I created a utility script 'mkmethod'. > http://www.kuwata-lab.com/webtech/kwartz/kwartz_2004-03-26_beta.tar.gz > bash$ ./mkmethod -p hoge.plogic hoge.html > def expand_hoge(_args) > user = _args[:user] > list = _args[:list] > print "Hello " Hello, yes, that looks good, however I think it would be better to return the expanded string instead of printing it. Andreas