Module: Roda::RodaPlugins::InjectERB

Defined in:
lib/roda/plugins/inject_erb.rb

Overview

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.

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Class Method Details

.load_dependencies(app) ⇒ Object



18
19
20
# File 'lib/roda/plugins/inject_erb.rb', line 18

def self.load_dependencies(app)
  app.plugin :render
end