instiki/vendor/plugins/erubis/test/data/users-guide/example2.rb
2010-07-04 08:51:53 -05:00

11 lines
312 B
Ruby

require 'erubis'
input = File.read('example2.eruby')
eruby = Erubis::Eruby.new(input, :trim=>false)
puts "----- script source ---"
puts eruby.src # print script source
puts "----- result ----------"
list = ['aaa', 'bbb', 'ccc']
puts eruby.result(binding()) # get result