Sha256: 95d2e0f08648b87834b1b40d084dbf71f6d34ac534e5faf22486bb0ea86d1f00
Contents?: true
Size: 761 Bytes
Versions: 2
Compression:
Stored size: 761 Bytes
Contents
Ramaze.setup(:verbose => false) do gem 'ezamar' end module Ramaze module View ## # View adapter for the Ezamar template engine. More information about this # engine can be found here: https://github.com/manveru/ezamar # module Ezamar TRANSFORM_PIPELINE = [ ::Ezamar::Element ] def self.call(action, string) ezamar = View.compile(string){|s| compile(action, s) } html = ezamar.result(action.binding) return html, 'text/html' end def self.compile(action, template) file = action.view || __FILE__ TRANSFORM_PIPELINE.each{|tp| template = tp.transform(template) } ::Ezamar::Template.new(template, :file => file) end end # Ezamar end # View end # Ramaze
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ramaze-2012.04.14 | lib/ramaze/view/ezamar.rb |
ramaze-2012.03.07 | lib/ramaze/view/ezamar.rb |