Class: Slim::Embedded::TiltEngine Private

Inherits:
Engine
  • Object
show all
Defined in:
lib/slim/embedded.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.

Basic tilt engine

Instance Method Summary collapse

Methods inherited from Filter

#on_slim_control, #on_slim_output, #on_slim_text

Instance Method Details

#on_slim_embedded(engine, 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.



134
135
136
137
138
# File 'lib/slim/embedded.rb', line 134

def on_slim_embedded(engine, body)
  tilt_engine = Tilt[engine] || raise(Temple::FilterError, "Tilt engine #{engine} is not available.")
  tilt_options = options[engine.to_sym] || {}
  [:multi, tilt_render(tilt_engine, tilt_options, collect_text(body)), collect_newlines(body)]
end