Sha256: 22d6349d8e2c88886b0babd408e91f0260a353732a5b6d69f10e9e1146e4a40e
Contents?: true
Size: 648 Bytes
Versions: 18
Compression:
Stored size: 648 Bytes
Contents
# -*- encoding: utf-8 -*- require 'webgen/content_processor' webgen_require 'builder' module Webgen class ContentProcessor # Processes content that is valid Ruby to build an XML tree. This is done by using the +builder+ # library. module Builder # Process the content of +context+ which needs to be valid Ruby code. The special variable +xml+ # should be used to construct the XML content. def self.call(context) xml = ::Builder::XmlMarkup.new(:indent => 2) eval(context.content, binding, context.ref_node.alcn) context.content = xml.target! context end end end end
Version data entries
18 entries across 18 versions & 1 rubygems