class Slim::EmbeddedEngine::InterpolateTiltEngine

Static template with interpolated ruby code

Public Class Methods

new(opts = {}) click to toggle source
# File lib/slim/embedded_engine.rb, line 138
def initialize(opts = {})
  super
  @protect = ProtectOutput.new
end

Public Instance Methods

collect_text(body) click to toggle source
# 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) click to toggle source
# File lib/slim/embedded_engine.rb, line 148
def tilt_render(tilt_engine, tilt_options, text)
  @protect.unprotect(tilt_engine.new(tilt_options) { text }.render)
end