Sha256: e39c28f5dc77d3e36c6048add9063b62c2af9cc171879b8f1864ff68d9fb7077

Contents?: true

Size: 492 Bytes

Versions: 47

Compression:

Stored size: 492 Bytes

Contents

# frozen_string_literal: false
require 'temple'
require 'haml/engine'
require 'haml/helpers'

module Haml
  Template = Temple::Templates::Tilt.create(
    Haml::Engine,
    register_as: [:haml, :haml],
  )

  module TemplateExtension
    # Activate Haml::Helpers for tilt templates.
    # https://github.com/judofyr/temple/blob/v0.7.6/lib/temple/mixins/template.rb#L7-L11
    def compile(*)
      "extend Haml::Helpers; #{super}"
    end
  end
  Template.send(:extend, TemplateExtension)
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
haml-6.3.0 lib/haml/template.rb
haml-6.2.5 lib/haml/template.rb
haml-6.2.4 lib/haml/template.rb
haml-6.2.3 lib/haml/template.rb
haml-6.2.2 lib/haml/template.rb
haml-6.2.1 lib/haml/template.rb
haml-6.2.0 lib/haml/template.rb
haml-6.1.4-java lib/haml/template.rb
haml-6.1.4 lib/haml/template.rb
haml-6.1.3-java lib/haml/template.rb
haml-6.1.3 lib/haml/template.rb
haml-6.1.2-java lib/haml/template.rb
haml-6.1.2 lib/haml/template.rb
haml-6.1.1-java lib/haml/template.rb
haml-6.1.1 lib/haml/template.rb
haml-6.1.0-java lib/haml/template.rb
haml-6.1.0 lib/haml/template.rb
haml-6.0.12-java lib/haml/template.rb
haml-6.0.12 lib/haml/template.rb
haml-6.0.11-java lib/haml/template.rb