Class: RedQuilt::TiltTemplate
- Inherits:
-
Tilt::Template
- Object
- Tilt::Template
- RedQuilt::TiltTemplate
- Defined in:
- lib/red_quilt/tilt.rb
Overview
Tilt template adapter. Require this file explicitly to register RedQuilt with Tilt – ‘tilt` is an optional dependency, so a missing gem surfaces as a LoadError here rather than silently disabling the integration:
require "red_quilt/tilt"
Tilt.new("page.md").render
Constant Summary collapse
- NATIVE_OPTIONS =
%i[allow_html disallow_raw_html extended_autolinks footnotes lint heading_ids].freeze
Instance Method Summary collapse
-
#allows_script? ⇒ Boolean
RedQuilt escapes raw HTML and never emits embedded scripting, so the output is a finished, script-free fragment.
- #evaluate(_scope, _locals) ⇒ Object
- #prepare ⇒ Object
Instance Method Details
#allows_script? ⇒ Boolean
RedQuilt escapes raw HTML and never emits embedded scripting, so the output is a finished, script-free fragment.
26 27 28 |
# File 'lib/red_quilt/tilt.rb', line 26 def allows_script? false end |
#evaluate(_scope, _locals) ⇒ Object
20 21 22 |
# File 'lib/red_quilt/tilt.rb', line 20 def evaluate(_scope, _locals) @output ||= RedQuilt.render_html(data, **) end |
#prepare ⇒ Object
18 |
# File 'lib/red_quilt/tilt.rb', line 18 def prepare; end |