Sha256: ed22cabfcf9a3ef74bf22089e426f17bfbf64e66b3aa03f17e6947ff873bcbc8

Contents?: true

Size: 763 Bytes

Versions: 2

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, type, 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

2 entries across 2 versions & 1 rubygems

Version Path
slim-1.3.9 lib/slim/filter.rb
slim-1.3.8 lib/slim/filter.rb