Class: Slim::Embedded::TagEngine Private
- 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.
Tag wrapper engine Generates a html tag and wraps another engine (specified via :engine option)
Direct Known Subclasses
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.
211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/slim/embedded.rb', line 211 def (engine, body) if [:engine] opts = {}.update() opts.delete(:engine) opts.delete(:tag) opts.delete(:attributes) @engine ||= [:engine].new(opts) body = @engine.(engine, body) end [:html, :tag, [:tag], [:html, :attrs, *[:attributes].map {|k, v| [:html, :attr, k, [:static, v]] }], body] end |