Sha256: dc294a04cf7a9af11a94d71e56eb7596d6c3221a792e356318b17673a88ffb44
Contents?: true
Size: 716 Bytes
Versions: 4
Compression:
Stored size: 716 Bytes
Contents
$:.unshift File.dirname(__FILE__) require 'rexml/document' require 'template_runner' module BuildMaster class XTemplate def initialize(template_file, templatelets = Hash.new) @template = REXML::Document.new(template_file) @templatelets = templatelets end def process(source, &evaluator) output_xml = process_xml(source, &evaluator) return output_xml end private def process_xml(source, &evaluator) output_xml = REXML::Document.new runner = TemplateRunner.new(output_xml, @template, source, &evaluator) runner.templatelets = @templatelets runner.process return output_xml end end end
Version data entries
4 entries across 4 versions & 1 rubygems