module HQMF2::Generator
Public Class Methods
render_template(name, params)
click to toggle source
# File lib/hqmf-generator/hqmf-generator.rb, line 4 def self.render_template(name, params) template_path = File.expand_path(File.join('..', "#{name}.xml.erb"), __FILE__) template_str = File.read(template_path) template = ERB.new(template_str, nil, '-', "_templ#{HQMF::Counter.instance.next}") context = ErbContext.new(params) template.result(context.get_binding) end