Module | Merb::Template::Erubis::Mixin |
In: |
merb-core/lib/merb-core/controller/template.rb
|
*args: | Arguments to pass to the block. |
&block: | The template block to call. |
String: | The output of the block. |
Capture being used in a .html.erb page:
<% @foo = capture do %> <p>Some Foo content!</p> <% end %>
:api: private
# File merb-core/lib/merb-core/controller/template.rb, line 229 229: def capture_erb(*args, &block) 230: _old_buf, @_erb_buf = @_erb_buf, "" 231: block.call(*args) 232: ret = @_erb_buf 233: @_erb_buf = _old_buf 234: ret 235: end