Sha256: 5719a172c6d963893f13d85effff04a2f6417fd6ce7e8923d9b6a6598b182f9e

Contents?: true

Size: 523 Bytes

Versions: 7

Compression:

Stored size: 523 Bytes

Contents

require 'ezamar'

module Ramaze
  module View
    module Ezamar
      TRANSFORM_PIPELINE = [ ::Ezamar::Element ]

      def self.call(action, string)
        template = compile(action, string)
        html = template.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
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
Pistos-ramaze-2009.04.08 lib/ramaze/view/ezamar.rb
manveru-ramaze-2009.04.01 lib/ramaze/view/ezamar.rb
manveru-ramaze-2009.04.08 lib/ramaze/view/ezamar.rb
manveru-ramaze-2009.04.18 lib/ramaze/view/ezamar.rb
manveru-ramaze-2009.04.22 lib/ramaze/view/ezamar.rb
manveru-ramaze-2009.04 lib/ramaze/view/ezamar.rb
ramaze-2009.04 lib/ramaze/view/ezamar.rb