Sha256: 47e8138df4d843769ee46c18711df2b79a96d345bb47f47647a31bd58300d169
Contents?: true
Size: 1.06 KB
Versions: 4
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 'amrita2/template' module Ramaze module Template # Is responsible for compiling a template using the Amrita2 templating engine. # Can be found at: http://rubyforge.org/projects/amrita2 class Amrita2 < Template ENGINES[self] = %w[ amrita amr ] class << self # Takes an Action # The file is rendered using Amrita2::TemplateFile. # The Controller is used as the object for expansion. # # The parameters are set to @params in the controller before expansion. def transform action instance, params, file = action.instance, action.params, action.template raise_no_action(action) unless file template = ::Amrita2::TemplateFile.new(file) out = '' instance.instance_variable_set('@params', params) template.expand(out, instance) out end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ramaze-0.1.3 | lib/ramaze/template/amrita2.rb |
ramaze-0.1.4 | lib/ramaze/template/amrita2.rb |
ramaze-0.2.1 | lib/ramaze/template/amrita2.rb |
ramaze-0.2.0 | lib/ramaze/template/amrita2.rb |