Class: Slim::EmbeddedEngine::InterpolateTiltEngine Private
- Inherits:
-
TiltEngine
- Object
- Temple::HTML::Filter
- Filter
- Slim::EmbeddedEngine
- TiltEngine
- Slim::EmbeddedEngine::InterpolateTiltEngine
- Defined in:
- lib/slim/embedded_engine.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.
Static template with interpolated ruby code
Instance Method Summary collapse
- #collect_text(body) ⇒ Object private
-
#initialize(opts = {}) ⇒ InterpolateTiltEngine
constructor
private
A new instance of InterpolateTiltEngine.
- #tilt_render(tilt_engine, tilt_options, text) ⇒ Object private
Methods inherited from TiltEngine
Methods inherited from Slim::EmbeddedEngine
Methods inherited from Filter
#on_slim_attrs, #on_slim_condcomment, #on_slim_control, #on_slim_embedded, #on_slim_output, #on_slim_tag
Constructor Details
#initialize(opts = {}) ⇒ InterpolateTiltEngine
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.
Returns a new instance of InterpolateTiltEngine.
138 139 140 141 |
# File 'lib/slim/embedded_engine.rb', line 138 def initialize(opts = {}) super @protect = ProtectOutput.new end |
Instance Method Details
#collect_text(body) ⇒ 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.
143 144 145 146 |
# File 'lib/slim/embedded_engine.rb', line 143 def collect_text(body) text = Interpolation.new.call(body) @protect.call(text) end |
#tilt_render(tilt_engine, tilt_options, text) ⇒ 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.
148 149 150 |
# File 'lib/slim/embedded_engine.rb', line 148 def tilt_render(tilt_engine, , text) @protect.unprotect(tilt_engine.new() { text }.render) end |