Example of using erb templates in a normal script:
require "erb"
require "ostruct"
tstr = "This the first <%= what %>"
tmpl = ERB.new(tstr)
puts tmpl.result(OpenStruct.new(:what => "value").send(:binding))
ERB uses a binding, and in this case, we’re using OpenStruct’s.