class Erubi::CaptureBlockEngine

An engine class that supports capturing blocks via the <%= and <%== tags:

<%= upcase_form do %>
  <%= 'foo' %>
<% end %>

Where upcase_form is defined like:

def upcase_form(&block)
  "<form>#{@bufvar.capture(&block).upcase}</form>"
end

With output being:

<form>
  FOO
</form>

This requires using a string subclass as the buffer value, provided by the CaptureBlockEngine::Buffer class.

This engine does not support the :escapefunc option. To change the escaping function, use a subclass of CaptureBlockEngine::Buffer and override the | method.

This engine does not support the :chain_appends option, and ignores it if present.