Class: Slim::Filter Private
- Inherits:
-
Temple::HTML::Filter
- Object
- Temple::HTML::Filter
- Slim::Filter
- Defined in:
- lib/slim/filter.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
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.
Direct Known Subclasses
CollectNewlines, CollectText, Compiler, EmbeddedEngine, EndInserter, Interpolation, ProtectOutput, Sections
Instance Method Summary collapse
-
#on_slim_attrs(*attrs) ⇒ Object
private
Pass-through handler.
-
#on_slim_condcomment(condition, content) ⇒ Object
private
Pass-through handler.
-
#on_slim_control(code, content) ⇒ Object
private
Pass-through handler.
-
#on_slim_embedded(type, content) ⇒ Object
private
Pass-through handler.
-
#on_slim_output(code, escape, content) ⇒ Object
private
Pass-through handler.
-
#on_slim_tag(name, attrs, content = nil) ⇒ Object
private
Pass-through handler.
Instance Method Details
#on_slim_attrs(*attrs) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Pass-through handler
31 32 33 |
# 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) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Pass-through handler
21 22 23 |
# File 'lib/slim/filter.rb', line 21 def on_slim_condcomment(condition, content) [:slim, :condcomment, condition, compile(content)] end |
#on_slim_control(code, content) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Pass-through handler
16 17 18 |
# File 'lib/slim/filter.rb', line 16 def on_slim_control(code, content) [:slim, :control, code, compile(content)] end |
#on_slim_embedded(type, content) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Pass-through handler
11 12 13 |
# File 'lib/slim/filter.rb', line 11 def (type, content) [:slim, :embedded, code, compile(content)] end |
#on_slim_output(code, escape, content) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Pass-through handler
26 27 28 |
# 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) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Pass-through handler
36 37 38 39 |
# 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 |