From: Dan Doel Date: 2004-04-19T09:55:43+09:00 Subject: Re: How do you know it quacks like a duck? Just use it as you would a Time object. Document your code and specify the method takes objects that act like Time, or something like that, and then use the methods of Time you need to use. If they violate your documented contract, it will cause exceptions, and they'll know they did something wrong. At least, that's the theoretical idea. More or less, the Ruby way of duck typing is to assume you're given a duck and treat it as such. You don't try to verify that it's a duck, because then you're doing static typing, and there's already exceptions if the correct methods aren't there (and there are ways of defining methods that you can't check for explicitly, like #method_missing). Hope this helps. - Dan