From: Andreas Schwarz Date: 2004-04-02T21:14:30+09:00 Subject: Re: [ANN] Kwartz (2004-03-19) released Makoto Kuwata wrote: > Andreas Schwarz wrote: >> yes, that looks good, however I think it would be better to return the >> expanded string instead of printing it. > > It is not able to return string if you are using eruby. > (This is not due to Kwartz nor mkmethod script.) > You can do it only with ERB. > > Compile: > ==================== > bash$ ./mkmethod -p hoge.plogic -M Hoge -l erb hoge.html > hoge.rb > ==================== I get the following error with my template (http://andreas-s.net/template.tar.gz): andreas@213-203-244-47:templates$ mkmethod -p template.plogic -M Template -l erb template.html /usr/local/lib/ruby/site_ruby/1.8/kwartz.rb:2654:in `exec_expr': undefined method `token' for nil:NilClass (NoMethodError) from /usr/local/lib/ruby/site_ruby/1.8/kwartz.rb:2679:in `exec_expr' from /usr/local/lib/ruby/site_ruby/1.8/kwartz.rb:2665:in `exec_expr' from /usr/local/lib/ruby/site_ruby/1.8/kwartz.rb:2690:in `exec_expr' from /usr/local/lib/ruby/site_ruby/1.8/kwartz.rb:2689:in `exec_expr' from /usr/local/lib/ruby/site_ruby/1.8/kwartz.rb:2765:in `exec_stmt' from /usr/local/lib/ruby/site_ruby/1.8/kwartz.rb:1069:in `execute' from /usr/local/lib/ruby/site_ruby/1.8/kwartz.rb:904:in `exec_nodelist' from /usr/local/lib/ruby/site_ruby/1.8/kwartz.rb:903:in `each' ... 51 levels... from /usr/local/lib/ruby/site_ruby/1.8/kwartz.rb:2640:in `analyze' from /usr/local/bin/mkmethod:128:in `compile' from /usr/local/bin/mkmethod:59:in `main' from /usr/local/bin/mkmethod:155