Sometimes it’s hard to decide how to handle a failure in a method call. Raise an exception? Return a nil? Log an error? The best choice may differ depending on where the method is being called. In today’s free RubyTapas episode, we look at a technique for deferring the decision about how to deal with a failure to the point when a method is called.
http://www.youtube.com/watch?v=Lb6AFi36n3M
[boilerplate bypath=”rubytapas-sample”]
This was very useful!
Nice tip, thanks!