Sha256: 5637b41fdd68f8396e654295be005f56cdc7ba4fdb002d293e181bd342bc4c75

Contents?: true

Size: 763 Bytes

Versions: 3

Compression:

Stored size: 763 Bytes

Contents

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(content)
      [:slim, :text, compile(content)]
    end

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

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slim-1.3.6 lib/slim/filter.rb
slim-1.3.5 lib/slim/filter.rb
slim-1.3.4 lib/slim/filter.rb