class Slim::Filter

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

Public Instance Methods

on_slim_attrs(*attrs) click to toggle source

Pass-through handler

# File lib/slim/filter.rb, line 31
def on_slim_attrs(*attrs)
  [:slim, :attrs, *attrs.map {|a| compile(a) }]
end
on_slim_condcomment(condition, content) click to toggle source

Pass-through handler

# File lib/slim/filter.rb, line 21
def on_slim_condcomment(condition, content)
  [:slim, :condcomment, condition, compile(content)]
end
on_slim_control(code, content) click to toggle source

Pass-through handler

# File lib/slim/filter.rb, line 16
def on_slim_control(code, content)
  [:slim, :control, code, compile(content)]
end
on_slim_embedded(type, content) click to toggle source

Pass-through handler

# File lib/slim/filter.rb, line 11
def on_slim_embedded(type, content)
  [:slim, :embedded, code, compile(content)]
end
on_slim_output(code, escape, content) click to toggle source

Pass-through handler

# File lib/slim/filter.rb, line 26
def on_slim_output(code, escape, content)
  [:slim, :output, code, escape, compile(content)]
end
on_slim_tag(name, attrs, content = nil) click to toggle source

Pass-through handler

# File lib/slim/filter.rb, line 36
def on_slim_tag(name, attrs, content = nil)
  tag = [:slim, :tag, name, compile(attrs)]
  content ? (tag << compile(content)) : tag
end