August 26, 2007 by thilo
I’m currently reading the Ruby Cookbook and found a good explanation for duck typing. You know, the concept to treat objects according to their methods rather their classes/modules. It might be well known to you, but i like to share it anyway.
Duck Typing means:
"... if an object quaks like a duck, just go ahead and treat it like a duck"