Class: Ramaze::Template::Ezamar
- Defined in:
- lib/ramaze/template/ezamar.rb
Overview
Is responsible for compiling a template using the Ezamar templating engine.
Constant Summary collapse
Class Method Summary collapse
-
.compile(action, template) ⇒ Object
Compile a template, applying all transformations from the pipeline and returning an instance of ::Ezamar::Template.
-
.transform(action) ⇒ Object
Transforms an action into the XHTML code for parsing and returns the result.
Methods inherited from Template
caching_compile, reaction_or_file, render_method, result_and_file, wrap_compile
Methods included from Helper::Methods
extend_object, #helper, included
Class Method Details
.compile(action, template) ⇒ Object
Compile a template, applying all transformations from the pipeline and returning an instance of ::Ezamar::Template
30 31 32 33 34 35 36 37 38 |
# File 'lib/ramaze/template/ezamar.rb', line 30 def compile(action, template) file = (action.template || __FILE__) TRANSFORM_PIPELINE.each do |tp| template = tp.transform(template) end ::Ezamar::Template.new(template, :file => file) end |
.transform(action) ⇒ Object
Transforms an action into the XHTML code for parsing and returns the result
22 23 24 25 |
# File 'lib/ramaze/template/ezamar.rb', line 22 def transform action ezamar = wrap_compile(action) ezamar.result(action.binding) end |