Sha256: 07b89265b0ca6d3a7563f54e0cda004f0cae05fbbc024bdbd1f2fa73a14653a0

Contents?: true

Size: 399 Bytes

Versions: 2

Compression:

Stored size: 399 Bytes

Contents

# frozen_string_literal: true

require "tilt/template"
require "erbse"

module Dry
  class View
    module Tilt
      # Tilt template class copied from cells-erb gem
      class ErbseTemplate < ::Tilt::Template
        def prepare
          @template = ::Erbse::Engine.new
        end

        def precompiled_template(_locals)
          @template.call(data)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dry-view-0.8.0 lib/dry/view/tilt/erbse.rb
dry-view-0.7.1 lib/dry/view/tilt/erbse.rb