10 lines
312 B
Ruby
10 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
|