Sha256: bf76a51faec79106af19fb5fd5c4f766bed73d8ab919553aabbb0e23fa7df5e1

Contents?: true

Size: 373 Bytes

Versions: 4

Compression:

Stored size: 373 Bytes

Contents

require 'haml/util'
require 'haml/engine'

module Ramaze
  module View
    module Haml
      def self.call(action, string)
        action.options[:filename] = (action.view || '(haml)')
        haml = ::Haml::Engine.new(string.to_s, action.options)
        html = haml.to_html(action.instance, action.variables)

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

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
manveru-ramaze-2009.04.18 lib/ramaze/view/haml.rb
manveru-ramaze-2009.04.22 lib/ramaze/view/haml.rb
manveru-ramaze-2009.04 lib/ramaze/view/haml.rb
ramaze-2009.04 lib/ramaze/view/haml.rb