O'Reilly logo

Eloquent Ruby by Russ Olsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 21. Use method_missing for Flexible Error Handling

My car worries too much. Well it’s not the whole car, it’s just the little embedded computer that lurks behind the door locks. That little processor seems to live in dread that I might someday accidentally leave my car unlocked. Thus, it devotes its whole being to making sure that no door stays unlocked for too long. I’m usually OK if I unlock the car and jump right in. But woe to me if I unlock the car and get a phone call. The time it takes to look at my cell phone to see who’s calling is apparently too long by the exacting standards of Toyota, and the doors relock. They’ll also lock in the time it takes to throw some groceries into the trunk. Or to kiss my wife goodbye. There have ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required