Sha256: c8f4984d320692e496b9ab5ae5292000f6105cf3d8bf8fcd0509c32a43c55419
Contents?: true
Size: 548 Bytes
Versions: 1
Compression:
Stored size: 548 Bytes
Contents
# -*- encoding: utf-8 -*- require 'webgen/content_processor' require 'erb' module Webgen class ContentProcessor # Processes embedded Ruby statements. module Erb extend ERB::Util # Process the Ruby statements embedded in the content of +context+. def self.call(context) erb = ERB.new(context.content, trim_mode: context.website.config['content_processor.erb.trim_mode']) erb.filename = context.ref_node.alcn context.content = erb.result(binding) context end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
webgen-1.7.1 | lib/webgen/content_processor/erb.rb |