require "amrita/template" require "amrita/merge" include Amrita # This idea was suggested by Tom Sawyer tmpfile = "/tmp/html1.html" File::open(tmpfile, "w") do |f| f.write <<-END Insertable Hello World! END end tmpl = TemplateText.new <<-END Insertion MockUp This comes from a template fragment: This will be replaced. END model_data = { :data => MergeTemplate.new} tmpl.expand(STDOUT, model_data) File::unlink tmpfile __END__ the output of file2, when passed through Amrita, would then be: Insertion MockUp This comes from a template fragment: Hello World!