Sha256: 4f842070bf10619ef481471925cadbadea217c2cf5bb8b5df593d2d2ea24c799
Contents?: true
Size: 430 Bytes
Versions: 6
Compression:
Stored size: 430 Bytes
Contents
module ErbAsterisk module Render # Render template def render(template, vars = {}) log_debug("render: #{template}", 2) old_erb_output = @erb_output @erb_output = '' erb = new_erb(read_template(template)) b = binding vars.each do |name, value| b.local_variable_set(name, value) end r = erb.result(b) @erb_output = old_erb_output r end end end
Version data entries
6 entries across 6 versions & 1 rubygems