Sha256: c2cd4196a0a76024f47f2895166ace84904666d6ebdd4598ba1557486d85c92c

Contents?: true

Size: 757 Bytes

Versions: 2

Compression:

Stored size: 757 Bytes

Contents

#                                                                          
# File 'haml.rb' created on 04 ago 2008 at 17:05:24.                    
#
# See 'dokkit.rb' or +LICENSE+ for licence information.                      
#                                                                          
# (C)2006-2008 Andrea Fazzi <andrea.fazzi@alca.le.it> (and contributors). 
#                                                                          

begin
  require 'haml'
rescue LoadError
  nil
end

module Dokkit
  module Filter

    class Haml

      def initialize(document)
        @document = document
      end

      def filter(text)
        ::Haml::Engine.new(text).to_html(@document.get_binding)
      end      

    end    


  end
end



Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dokkit-0.4.4 lib/dokkit/filters/haml.rb
dokkit-0.5.0 lib/dokkit/filters/haml.rb