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 14 def self.call(context) 15 xml = ::Builder::XmlMarkup.new(:indent => 2) 16 eval(context.content, binding, context.ref_node.alcn) 17 context.content = xml.target! 18 context 19 end