Join the DZone community and get the full member experience.Join For Free
I made a layout with some slightly ugly code for making rounded boxes with CSS and HTML, and wanted a way to automate the boxes. I had thought of having two functions to print starting and ending code, but this seems nicer. This goes with the other application helpers:
def rounded_box(█) concat 'This goes in a view:', block.binding end' + capture(█) + '
<% rounded_box do %> ... stuff to put in the rounded box ... <% end %>
Opinions expressed by DZone contributors are their own.