As rails 5.1+ switched to erubi I tried to use that in ruby script:
require 'erubi'
template = Erubi::Engine.new("<%= test %>", escape: true)
However I'm stacked trying to render that template to html.
erubi source code: https://github.com/jeremyevans/erubi
erubi is fork of erubis, and in erubis the rendering is done via result method:
require 'erubis'
template = Erubis::Eruby.new("<%= test %>", escape: true)
template.result test: "<br>here" #=> "<br>here"
However there's no result method in erubi.