Module: Ramaze::View::Ezamar
- Defined in:
- lib/ramaze/view/ezamar.rb
Overview
View adapter for the Ezamar template engine. More information about this engine can be found here: github.com/manveru/ezamar
Constant Summary collapse
- TRANSFORM_PIPELINE =
[ ::Ezamar::Element ]
Class Method Summary collapse
Class Method Details
.call(action, string) ⇒ Object
12 13 14 15 16 |
# File 'lib/ramaze/view/ezamar.rb', line 12 def self.call(action, string) ezamar = View.compile(string){|s| compile(action, s) } html = ezamar.result(action.binding) return html, 'text/html' end |
.compile(action, template) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/ramaze/view/ezamar.rb', line 18 def self.compile(action, template) file = action.view || __FILE__ TRANSFORM_PIPELINE.each{|tp| template = tp.transform(template) } ::Ezamar::Template.new(template, :file => file) end |