Sha256: 09dca3b680a3c53d51258ff5a484b60864ce0576955559de75a9d44f00a73eef
Contents?: true
Size: 528 Bytes
Versions: 2
Compression:
Stored size: 528 Bytes
Contents
require 'erb' module RunLoop # class to break up javascript templates in to reusable chunks class UIAScriptTemplate < ERB def initialize(template_root, template_relative_path) @template_root = template_root @template = File.read(File.join(@template_root, template_relative_path)) super(@template) end def render_template(template_relative_path) return UIAScriptTemplate.new(@template_root, template_relative_path).result end def result super(binding) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
run_loop-2.0.3 | lib/run_loop/template.rb |
run_loop-2.0.2 | lib/run_loop/template.rb |