Class: ActionView::Template::Handlers::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/action_view/template/handlers/builder.rb

Instance Method Summary collapse

Instance Method Details

#call(template, source) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/action_view/template/handlers/builder.rb', line 8

def call(template, source)
  require_engine
  # the double assignment is to silence "assigned but unused variable" warnings
  "xml = xml = ::Builder::XmlMarkup.new(indent: 2, target: output_buffer.raw);" \
    "#{source};" \
    "output_buffer.to_s"
end