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

11 lines
336 B
Ruby

require 'erubis'
input = File.read('example3.eruby')
eruby = Erubis::EscapedEruby.new(input) # or Erubis::XmlEruby
puts "----- script source ---"
puts eruby.src # print script source
puts "----- result ----------"
list = ['<aaa>', 'b&b', '"ccc"']
puts eruby.result(binding()) # get result