Sha256: 5f4a1fe01d0acd450664181bd55a858938ad76147e7a43c66557f9f8baae8bca

Contents?: true

Size: 396 Bytes

Versions: 6

Compression:

Stored size: 396 Bytes

Contents

# frozen_string_literal: true

module Liquid
  class Tag
    module Disabler
      module ClassMethods
        attr_reader :disabled_tags
      end

      def self.prepended(base)
        base.extend(ClassMethods)
      end

      def render_to_output_buffer(context, output)
        context.with_disabled_tags(self.class.disabled_tags) do
          super
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
liquid-5.4.0 lib/liquid/tag/disabler.rb
liquid-5.3.0 lib/liquid/tag/disabler.rb
liquid-5.2.0 lib/liquid/tag/disabler.rb
liquid-5.1.0 lib/liquid/tag/disabler.rb
liquid-5.0.1 lib/liquid/tag/disabler.rb
liquid-5.0.0 lib/liquid/tag/disabler.rb