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

12 lines
271 B
Ruby

class MyData
attr_accessor :val, :list
end
## any object can be a context object
mydata = MyData.new
mydata.val = 'Erubis Example'
mydata.list = ['aaa', 'bbb', 'ccc']
require 'erubis'
eruby = Erubis::Eruby.new(File.read('example5.eruby'))
puts eruby.evaluate(mydata)