29 Mar '13, 10pm

Ruby: How do I build DSLs with yield and instance_eval?

statement is a very important concept to understand when building a Ruby DSL. The functionality provided by yield allows a developer to pass off control temporarily to allow for configuration or advanced functionality. Yielding is a pattern that completely pervades the Ruby language, including the Ruby standard library (the functionality included with the language itself). If you’ve ever used the Array#map (or Array#collect ) functionality, that’s one example of a yield pattern. An example use to increment all the items in an array would look like this:

Full article: http://rubylearning.com/blog/2010/11/30/how-do-i-build-ds...

Tweets

Build your own Ruby and Rails Searchable API Docs

rubyflow.com 28 Mar '13, 7pm

Build your own Ruby and Rails Searchable API Docs Posted by phallstrom on March 28, 2013 — 1 comment If you want a local, ...

Solar Investments Stand to Yield Millions for Local School Children

Solar Investments Stand to Yield Millions for L...

greentechmedia.com 29 Mar '13, 4pm

Evergreen Energy Solutions Solar Investments Stand to Yield Millions for Local School Children Energy cost-savings can be ...

Making it Easier to Build Firmware

hackaday.com 28 Mar '13, 3pm

Most microcontroller manufacturers give you some kind of free development toolchain or IDE with their silicon products. Of...

HTC One: Great Build Quality but Almost Impossible to Repair

HTC One: Great Build Quality but Almost Impossi...

soyacincau.com 30 Mar '13, 12am

The battery is buried beneath the motherboard and adhered to the midframe, hindering its replacement. The display assembly...