Sha256: 8ddbb87eb9e33a1c76916fabb012b2fe82a78f92c2716a1efed329a6f4d261c7

Contents?: true

Size: 702 Bytes

Versions: 1

Compression:

Stored size: 702 Bytes

Contents

# frozen_string_literal: true

module Dry
  class View
    module Tilt
      module Haml
        def self.requirements
          ["hamlit", <<~ERROR]
            dry-view requires hamlit (3.0 or greater) for full compatibility when rendering .haml templates (e.g. implicitly capturing block content when yielding)

            To ignore this and use another engine for .haml templates, dereigster this adapter before calling your views:

            Dry::View::Tilt.deregister_adatper(:haml)
          ERROR
        end

        def self.activate
          # Requiring hamlit will register the engine with Tilt
          self
        end
      end

      register_adapter :haml, Haml
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dry-view-0.8.0 lib/dry/view/tilt/haml.rb