blob: e99b921cb773b68ca67bbc76f801c45869630631 (
plain) (
tree)
|
|
module ActionView
module Template::Handlers
class Builder
# Default format used by Builder.
class_attribute :default_format
self.default_format = :xml
def call(template)
require_engine
"xml = ::Builder::XmlMarkup.new(:indent => 2);" \
"self.output_buffer = xml.target!;" +
template.source +
";xml.target!;"
end
private
def require_engine # :doc:
@required ||= begin
require "builder"
true
end
end
end
end
end
|