Sha256: 844b8e07d9c4a5f7365c133eb54f0ef3242cea2938f132bbb866f62587ad1eba
Contents?: true
Size: 542 Bytes
Versions: 14
Compression:
Stored size: 542 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, nil, 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
14 entries across 14 versions & 1 rubygems