Sha256: 0e7cca741f5a8a1361b047d6edf24ebee3b122460a4d24203d6a80b5d70cc0bd
Contents?: true
Size: 688 Bytes
Versions: 2
Compression:
Stored size: 688 Bytes
Contents
# frozen_string_literal: true module Dry class View module Tilt module ERB def self.requirements ["dry/view/tilt/erbse", <<~ERROR] dry-view requires erbse for full compatibility when rendering .erb templates (e.g. implicitly capturing block content when yielding) To ignore this and use another engine for .erb templates, deregister this adapter before calling your views: Dry::View::Tilt.deregister_adapter(:erb) ERROR end def self.activate Tilt.default_mapping.register ErbseTemplate, "erb" self end end register_adapter :erb, ERB end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dry-view-0.8.0 | lib/dry/view/tilt/erb.rb |
dry-view-0.7.1 | lib/dry/view/tilt/erb.rb |