Module: Ramaze::View::Ezamar
- Defined in:
- lib/ramaze/view/ezamar.rb
Constant Summary collapse
- TRANSFORM_PIPELINE =
[ ::Ezamar::Element ]
Class Method Summary collapse
Class Method Details
.call(action, string) ⇒ Object
8 9 10 11 12 |
# File 'lib/ramaze/view/ezamar.rb', line 8 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
14 15 16 17 18 19 20 |
# File 'lib/ramaze/view/ezamar.rb', line 14 def self.compile(action, template) file = action.view || __FILE__ TRANSFORM_PIPELINE.each{|tp| template = tp.transform(template) } ::Ezamar::Template.new(template, :file => file) end |