2
eruby = Erubis::Eruby.new(File.read('template1.rhtml'))
3
items = ['foo', 'bar', 'baz']
5
## local variable 'x' and 'eruby' are passed to template as well as 'items'!
6
print eruby.result(binding())
7
## local variable 'x' is changed unintendedly because it is changed in template!
8
puts "** debug: x=#{x.inspect}" #=> "baz"