Sha256: db039eb100606e72b4873df343af33b8397fc5114864e982b92c728e5d1883d9

Contents?: true

Size: 417 Bytes

Versions: 17

Compression:

Stored size: 417 Bytes

Contents

module MagLove
  module Tilt
    class HamlTemplate < ::Tilt::Template
      self.default_mime_type = 'theme/html'

      def prepare
      end

      def evaluate(scope, locals, &block)
        @output ||= Hamloft::Engine.new(data, { remove_whitespace: true }).render(scope, locals)
      end

      def allows_script?
        false
      end
    end
  end
end

Tilt.mappings["haml"] = [MagLove::Tilt::HamlTemplate]

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
maglove-1.1.5 lib/maglove/tilt/haml_template.rb
maglove-1.1.4 lib/maglove/tilt/haml_template.rb
maglove-1.1.3 lib/maglove/tilt/haml_template.rb
maglove-2.0.4 lib/maglove/tilt/haml_template.rb
maglove-2.0.2 lib/maglove/tilt/haml_template.rb
maglove-2.0.1 lib/maglove/tilt/haml_template.rb
maglove-1.1.2 lib/maglove/tilt/haml_template.rb
maglove-2.0.0 lib/maglove/tilt/haml_template.rb
maglove-1.1.1 lib/maglove/tilt/haml_template.rb
maglove-1.1.0 lib/maglove/tilt/haml_template.rb
maglove-1.0.9 lib/maglove/tilt/haml_template.rb
maglove-1.0.8 lib/maglove/tilt/haml_template.rb
maglove-1.0.7 lib/maglove/tilt/haml_template.rb
maglove-1.0.5 lib/maglove/tilt/haml_template.rb
maglove-1.0.4 lib/maglove/tilt/haml_template.rb
maglove-1.0.3 lib/maglove/tilt/haml_template.rb
maglove-1.0.2 lib/maglove/tilt/haml_template.rb