Module: Roda::RodaPlugins::CaptureERB
- Defined in:
- lib/roda/plugins/capture_erb.rb
Overview
The capture_erb plugin allows you to capture the content of a block in an ERB template, and return it as a value, instead of injecting the template block into the template output.
<% value = capture_erb do %>
Some content here.
<% end %>
capture_erb
can be used inside other methods that are called inside templates. It can be combined with the inject_erb plugin to wrap template blocks with arbitrary output and then inject the wrapped output into the template.
Defined Under Namespace
Modules: InstanceMethods
Class Method Summary collapse
Class Method Details
.load_dependencies(app) ⇒ Object
19 20 21 |
# File 'lib/roda/plugins/capture_erb.rb', line 19 def self.load_dependencies(app) app.plugin :render end |