module Webgen::ContentProcessor::Erubis

Processes embedded Ruby statements with the erubis library.

Public Class Methods

call(context) click to toggle source

Process the Ruby statements embedded in the content of context.

   # File lib/webgen/content_processor/erubis.rb
26 def self.call(context)
27   options = context.website.config['content_processor.erubis.options']
28   erubis = if context.website.config['content_processor.erubis.use_pi']
29              CompatiblePIEruby.new(context.content, options)
30            else
31              CompatibleEruby.new(context.content, options)
32            end
33   erubis.filename = context.ref_node.alcn
34   context.content = erubis.result(binding)
35   context
36 end