# Erbse _An updated version of Erubis._ Erbse compiles an ERB string to a string of Ruby. ## API The API is one public method. ```ruby Erbse::Engine.new.call("<% ... %>") #=> string of compiled ruby. ``` The returned string can then be `eval`uated in a certain context. ## Output Buffers Erbse does not use instance variables as output buffer, only local variables. | Tag | Behavior | | --- | --- | | `<% %>` | Executes the code but does not output anything. | | `<% .. do %>` | Executes the code but does not output anything. In the block, output is written to the current buffer. | | `<%= %>` | Executes the code, outputs to current buffer. | | `<%= .. do %>` | Executes the code and appends returned value to the current buffer. In the block, output is written to a new buffer that is returned when `yield`ing. | | `<%@ .. do %>` | Executes the code but does not output anything. In the block, output is written to a new buffer that is returned when `yield`ing. | ## Block Yielding Erbse supports blocks à la Rails. You may pass any mix of text/ERB via blocks to Ruby methods. ```erb <%= form do %> Please fill out all fields! <%= input :email %>