22 Mar '12, 3am

@ryanbigg

I've recently been writing up some material and using ERB to handle the majority of my formatting needs. For example, the code below shows what my template may start with. I use ERB to generate both .doc and .html files. If I generate an html file the above template will produce the html found below.<title>Appending to ERB output</title> This is very straightforward stuff easily handled by ERB. I use classes and bindings for my needs, but the example below is a simplified version that should get the point across.require 'erb' template = <<eos <%= title "Appending to ERB output" %> eos def title(text) "<title>#{text}</title>" end puts ERB.new(template).result I recently ran into a different situation that took a bit more effort. In the material I was writing up I needed a sidebar. I thought that the best way to represent the sidebar in my template was to use a block. Using ...

Full article: http://blog.jayfields.com/2007/01/appending-to-erb-output...

Tweets

Firefox to block all keyword data using HTTPS b...

blogstorm.co.uk 21 Mar '12, 10pm

Firefox to block all keyword data using HTTPS by default by Patrick Altoft on March 21, 2012 / no responses Tweet Earlier ...

#TransitionBenefits: Is YOUR #Sailor maximizing...

navy.mil 21 Mar '12, 9am

MILLINGTON, Tenn. (NNS) -- Sailors transitioning from active-duty as a result of the Enlisted Retention Board (ERB) are en...

Jay Fields' Thoughts: Ruby: Defining Class Meth...

blog.jayfields.com 25 Mar '12, 12am

"This [, Class.method,] is the version that recent Java/C# converts seem to prefer. I'm not a big fan of this version beca...