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, line 26
def self.call(context)
  options = context.website.config['content_processor.erubis.options']
  erubis = if context.website.config['content_processor.erubis.use_pi']
             CompatiblePIEruby.new(context.content, options)
           else
             CompatibleEruby.new(context.content, options)
           end
  erubis.filename = context.ref_node.alcn
  context.content = erubis.result(binding)
  context
end