Skip to content

Instantly share code, notes, and snippets.

@ashaw
Created February 17, 2010 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashaw/306573 to your computer and use it in GitHub Desktop.
Save ashaw/306573 to your computer and use it in GitHub Desktop.
<!-- three thoughts for a Homer templating DSL called 'Ho' -->
<!-- currently -->
<div id="feature">
<% feature = Ho.new(@homepage,'feature') %> <!-- 'in-slot' init -->
<%= feature.title %>
<%= feature.body %>
</div>
<!-- thought 1 -->
<% h = Ho.new(@homepage) %> <!-- top of file init -->
<div id="feature">
<%= h.s('feature').title %>
<%= h.s('feature').body %>
</div>
<!-- thought 2 -->
<% h = Ho.new(@homepage) %> <!-- top of file init -->
<div id="feature">
<% h.s('feature') do |feature| %>
<%= feature.title %>
<%= feature.body %>
<% end %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment