Sha256: a4b280599376bf7d8da3809b9bbc01998a8885e712a7fee9a2cd2fb891d7b636

Contents?: true

Size: 589 Bytes

Versions: 7

Compression:

Stored size: 589 Bytes

Contents

#          Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
# All files in this distribution are subject to the terms of the Ruby license.

require 'erubis'

module Ramaze
  module View
    module Erubis
      OPTIONS = { :engine => ::Erubis::Eruby }

      def self.call(action, string)
        options = OPTIONS.dup
        engine = options.delete(:engine)

        eruby = engine.new(string, options)
        eruby.init_evaluator(:filename => (action.view || __FILE__))
        html = eruby.result(action.binding)

        return html, 'text/html'
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

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