Robert Klemme

Writing Block Methods with automatic Resource Cleanup


~3 years ago by Robert Klemme on Ruby Best Practices.
After we have seen how File.open with a block is safer than without we will look into how such methods are created today. Ingredients We need two ingredients...

Using Blocks for Robustness


~3 years ago by Robert Klemme on Ruby Best Practices.
Ruby’s blocks can be used for many purposes — in fact, they might well be the most used feature of the language. Today we will start looking...