--nextPart9813641.QEPanFjtay
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

On Monday 02 June 2014 19:15:44, Roelof Wobben <r.wobben / home.nl> wrote:
> But what I try is this.
> 
> Suppose you have the class A and you would check if it's a duck.

Basically, you don't. It's the whole sense of duck typing: You do not longer 
check, directly or indirectly, whether an object is of a certain class or 
implements a certain interface. You just call obj.method().

> I think you can do class A.responds_to(:quack) and if that's true you
> know its a duck.

Again: You don't need to know. If it walks and quacks, for all what it's 
worth, you can just assume it's a duck. It could be Cthulhu, but as long as He 
walks and quacks, you just treat Him like a duck instead of going completely 
insane.

			--- Eric
--nextPart9813641.QEPanFjtay
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAABAgAGBQJTjLqYAAoJEIXD2TZ1epVBoXcQAI9bYIOWIDBPUFbNsM4Om1S/
wPcf/xh1POcZCdR3h+0nfhFdfoYhTIwW0Dv1KunsbnBlXsOSYaBT2pLMM73Vi0QJ
RYQtzpFcEPD/AGGfourybl51DwhkfFB+wEAMCBfQ/GudqFsdW9+w5P1YYk/7xgs7
BtoGnt6BMq47zugUtvTKL18FsXvfrSMd+I5splfG1jbmXjUSbpDRtlksZ/h5lsO/
qYPT7V8D57mnEorRkztZahCHeq4GILiS6KAtJYpU3SAryqZNGKlfjhAuR2zve9AO
OPxSSKAEdHr9etJAZs1TwSLpo8XAKuRHYX/+DRNLsJmPbKImO+GoiHLHr1sov53i
hugut4xj5G3CMlXEYyBzejjWUngxVsO3JBdr0lA5ZBD+Cwc3Vtw0UQrKJH6WtFkq
W9nDssZIcGUXLF7gzx7RmirqBLRDS6z0m22N3OP6HmA9kZiqrg3x4CNxL38RebqB
44OTYsVvkXIoxNllZ1gmUxkKDBxWoQt9NZDhklWoBIDfYMmtBqm5YZyJMmUjKh5M
XYcPo3JsLRk+XsOuAypkr8YSBVap7+icULtcSeXi1Xk7T5zk3r/Y+g1ubdO6iK8v
w9NK4qvW4lOdAR3rxA3K8iamCbuUkUZxgN1rE9GRThvJpGpueyKHyiFqDMIZkDwi
wxLkKJ5G0jAUxGIXAGqc
=giel
-----END PGP SIGNATURE-----

--nextPart9813641.QEPanFjtay--