class Tilt::SigilTemplate
see: github.com/gliderlabs/sigil<br>Standalone string interpolator and template processor implementation in Go.
def allows_script?
def allows_script? false end
def evaluate(scope, locals, &block)
def evaluate(scope, locals, &block) variables = locals.map {|k, v| "#{k}=#{v}" } cmd = ['sigil'] unless variables.empty? cmd << '-p' cmd.concat(variables) end out, err, status = Open3.capture3(*cmd, :stdin_data => data) if status.success? out.chomp else raise err.chomp.gsub('<stdin>', file) end end
def prepare
def prepare end