From: Gavin Sinclair Date: 2004-11-16T22:08:12+09:00 Subject: Re: ERB suggestions On Tuesday, November 16, 2004, 10:00:26 PM, Michael wrote: >> Second, the Ruby 'erb' interface could be much improved. Code written >> with it is very cryptic. I'm happy to prepare a patch, but only if >> there's support for changing it. > Can you give an example, how your proposed non-cryptic code would look like? Instead of erb = ERB.new(template_text, 1, '%<>') the following is at least an improvement. erb = ERB.new(template_text, :safe_level => 1, :shortcut => true, :cut_lines => '<>') I'd prefer erb = ERB.new(template_text) do |e| e.safe_level = 1 e.shortcut = true e.cut_lines = '<>' # This is still cryptic, but that's OK. end Gavin