module Roda::RodaPlugins::InjectERB

  1. lib/roda/plugins/inject_erb.rb

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.

Methods

Public Class

  1. load_dependencies

Public Class methods

load_dependencies(app)
[show source]
   # File lib/roda/plugins/inject_erb.rb
18 def self.load_dependencies(app)
19   app.plugin :render
20 end