PDA

View Full Version : [RedHanded] Markaby 0.3


ruby-lang
March 8th, 2006, 10:30 PM
<p>Now that Markaby’s had some life experiences, Tim and I have sucker-punched it a bit here and there. And the sum of those shapings is 0.3.</p>


<p>You already know to <code>gem install markaby</code>.</p>


<ul>
<li>Finally, <a href="http://markaby.rubyforge.org/">full documentation</a>.</li>
<li>A new <a href="http://markaby.rubyforge.org/classes/Markaby/ActionControllerHelper.html#M000005">render_markaby</a> method for quickly outputting from inside a controller.</li>
<li>Cleaned up for general Ruby use, just attach a block to <code>Markaby::Builder.new</code> containing all your <span class="caps">HTML</span> calls.</li>
</ul>


<p>A tip: you know how all calls to helpers are automatically output to the builder stream? Well, if you need the helper method’s output, just call it against the <code>@helpers</code> instance var.</p>


<pre>
p "Total is: #{@helpers.number_to_human_size @file_bytes}"
</pre>

<p>At least until we decide upon something fancier.</p>

<a href="http://redhanded.hobix.com/inspect/markaby03.html" target="_blank">http://redhanded.hobix.com/inspect/markaby03.html</a>