Class: RunLoop::UIAScriptTemplate
- Inherits:
-
ERB
- Object
- ERB
- RunLoop::UIAScriptTemplate
- Defined in:
- lib/run_loop/template.rb
Overview
class to break up javascript templates in to reusable chunks
Instance Method Summary collapse
-
#initialize(template_root, template_relative_path) ⇒ UIAScriptTemplate
constructor
A new instance of UIAScriptTemplate.
- #render_template(template_relative_path) ⇒ Object
- #result ⇒ Object
Constructor Details
#initialize(template_root, template_relative_path) ⇒ UIAScriptTemplate
Returns a new instance of UIAScriptTemplate.
7 8 9 10 11 |
# File 'lib/run_loop/template.rb', line 7 def initialize(template_root, template_relative_path) @template_root = template_root @template = File.read(File.join(@template_root, template_relative_path)) super(@template) end |
Instance Method Details
#render_template(template_relative_path) ⇒ Object
13 14 15 |
# File 'lib/run_loop/template.rb', line 13 def render_template(template_relative_path) return UIAScriptTemplate.new(@template_root, template_relative_path).result end |
#result ⇒ Object
17 18 19 |
# File 'lib/run_loop/template.rb', line 17 def result super(binding) end |