Class: ActionView::TemplateHandlers::Builder
- Inherits:
-
ActionView::TemplateHandler
- Object
- ActionView::TemplateHandler
- ActionView::TemplateHandlers::Builder
- Includes:
- Compilable
- Defined in:
- lib/action_view/template_handlers/builder.rb
Instance Method Summary collapse
Methods included from Compilable
Methods inherited from ActionView::TemplateHandler
Constructor Details
This class inherits a constructor from ActionView::TemplateHandler
Instance Method Details
#compile(template) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/action_view/template_handlers/builder.rb', line 8 def compile(template) "_set_controller_content_type(Mime::XML);" + "xml = ::Builder::XmlMarkup.new(:indent => 2);" + "self.output_buffer = xml.target!;" + template.source + ";xml.target!;" end |