Class: Slim::EmbeddedEngine::InterpolateTiltEngine Private
- Inherits:
-
TiltEngine
- Object
- Temple::HTML::Filter
- Filter
- 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.
- #render(engine, text) ⇒ Object private
Methods inherited from TiltEngine
Methods inherited from Filter
#on_slim_condcomment, #on_slim_control, #on_slim_embedded, #on_slim_output
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.
154 155 156 157 |
# File 'lib/slim/embedded_engine.rb', line 154 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.
159 160 161 162 |
# File 'lib/slim/embedded_engine.rb', line 159 def collect_text(body) text = Interpolation.new.call(body) @protect.call(text) end |
#render(engine, 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.
164 165 166 |
# File 'lib/slim/embedded_engine.rb', line 164 def render(engine, text) @protect.unprotect(engine.new { text }.render) end |