Sha256: e18c51add7e9cf69c03fac5a7ff5bcb73fabf25ea45bc75dad07910e62e44e2e
Contents?: true
Size: 651 Bytes
Versions: 10
Compression:
Stored size: 651 Bytes
Contents
require 'erb' module RunLoop # @!visibility private # Class to break up javascript templates in to reusable chunks class UIAScriptTemplate < ERB # @!visibility private def initialize(template_root, template_relative_path) @template_root = template_root @template = File.read(File.join(@template_root, template_relative_path)).force_encoding("utf-8") super(@template) end # @!visibility private def render_template(template_relative_path) UIAScriptTemplate.new(@template_root, template_relative_path).result end # @!visibility private def result super(binding) end end end
Version data entries
10 entries across 10 versions & 1 rubygems