module Webgen::ContentProcessor::Builder
Processes content that is valid Ruby to build an
XML tree. This is done by using the builder library.
Public Class Methods
call(context)
click to toggle source
Process the content of context which needs to be valid Ruby code. The special variable xml
should be used to construct the XML content.
# File lib/webgen/content_processor/builder.rb, line 14 def self.call(context) xml = ::Builder::XmlMarkup.new(:indent => 2) eval(context.content, binding, context.ref_node.alcn) context.content = xml.target! context end