Sha256: a59da1d8eb397038608221c0958971fae45a0c48ffccc7af1dd293461f25c6c5
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
Contents
# Copyright (c) 2006 Michael Fellinger m.fellinger@gmail.com # All files in this distribution are subject to the terms of the Ruby license. require 'ramaze/template/ezamar/engine' module Ramaze module Template # Is responsible for compiling a template using the Ezamar templating engine. class Ezamar < Template ENGINES[self] = %w[ xhtml zmr ] TRANSFORM_PIPELINE = [ ::Ezamar::Element ] class << self # Transforms an action into the XHTML code for parsing and returns # the result def transform action ezamar = wrap_compile(action) ezamar.result(action.binding) end # Compile a template, applying all transformations from the pipeline # and returning an instance of ::Ezamar::Template 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 end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ramaze-0.1.2 | lib/ramaze/template/ezamar.rb |