Sha256: ef0f9e2f2968da514bf795bd1c275bf53e6c0ba9574e4dc60944fb75e3463782

Contents?: true

Size: 819 Bytes

Versions: 7

Compression:

Stored size: 819 Bytes

Contents

# frozen_string_literal: true
module Slim
  # Base class for Temple filters used in Slim
  #
  # This base filter passes everything through and allows
  # to override only some methods without affecting the rest
  # of the expression.
  #
  # @api private
  class Filter < Temple::HTML::Filter
    # Pass-through handler
    def on_slim_text(type, content)
      [:slim, :text, type, compile(content)]
    end

    # Pass-through handler
    def on_slim_embedded(type, content, attrs)
      [:slim, :embedded, type, compile(content), attrs]
    end

    # Pass-through handler
    def on_slim_control(code, content)
      [:slim, :control, code, compile(content)]
    end

    # Pass-through handler
    def on_slim_output(escape, code, content)
      [:slim, :output, escape, code, compile(content)]
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
brakeman-6.2.2 bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/filter.rb
brakeman-6.2.2.rc1 bundle/ruby/3.3.0/gems/slim-5.2.1/lib/slim/filter.rb
brakeman-6.2.1 bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/filter.rb
brakeman-6.2.0 bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/filter.rb
slim-5.2.1 lib/slim/filter.rb
slim-5.2.0 lib/slim/filter.rb
slim-5.1.1 lib/slim/filter.rb