module Roda::RodaPlugins::InjectERB
The inject_erb plugin allows you to inject content directly into the template output:
<% inject_erb("Some HTML Here") %>
This will inject Some HTML Here
into the template output, even though the tag being used is <%
and not <%=
.
This method can be used inside methods, such as to wrap calls to methods that accept template blocks, to inject code before and after the template blocks.
Public Class Methods
Source
# File lib/roda/plugins/inject_erb.rb, line 18 def self.load_dependencies(app) app.plugin :render end