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

On Monday 02 June 2014 20:15:00, Roelof Wobben <r.wobben / home.nl> wrote:
> Then I think I misunderstood the exercise.

Hm, naw, I guess I misunderstood what you're trying to archieve.

Of course you can check explicitly whether some object "implements an 
interface", although something like an interface doesn't _explicitly_ exist in 
the Ruby world.

So, sure you can check whether a class would respond to a set of methods, like 
you did with .respond_to? or by examinating the arrays returned by .methods or 
.instance_methods.

Still, that seems to be alot like forcing a Java/C++ pattern on Ruby. Perhaps 
somebody else can comment on this, but my guess would be that this is not the 
way to Ruby Zen?

HTH.

			--- Eric
--nextPart4504067.j1e9o7yXOY
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)

iQIcBAABAgAGBQJTjM0yAAoJEIXD2TZ1epVBg5oP/imJC739rU0e+gcrWf2SKKXm
5SSxVUl8zjWXUTS+JMhqHzqD75CtT7e0a8c1efY2U6Lf2vmGwVFemPART8xs/txu
DlRKLyRrhXKniQEAFgeUtJJIrjFsdMeercUQvTe7/7R4TxWK/M2lTBYMgUufWfLK
2V97WAp1o/pHrshiSxGPaV4UAX5DGquixUsDYv78Ko3qPF5Ws6pq9yJJJQmh1ugM
TOVnfEyabf81qwKmEAG0rWBcZbN3jZm3p9lAahztly1f3t1qvHvCucYZ76/8mdYk
wwv8M3tGnphfvwtW5aKO+j5Mj2JgH47H1ht+zO0TruwEXwtecaILqadCHEvB16Rf
//YIbkWSS+eYA2f8aITYQcZ1CNlhc0wnGma97i1IFwuQNCEaXGbK8seJJVhPdIxN
k8FQ+z8EogGzkLfBjD1pDIJPKrAiygK8mDCX05ntzvnnhjGJ3QlBeLzLEOj/1hVc
boYRxooaiLNEB+WpLOjjRNyGD2/1n29prhuzubVF2GkVP+DHXu4xVyGBjU8YVxlR
rq+ZS2wT6iPQF9GwIDi2RGorCzs3scuKL+JvbBSJtLNkP2Em3/Iim2InSEAX0+aV
MZjE83+1TrCjOKurBxZTPW98pnqDBWdB/F2XvIHGtYa4y4dqESkXfqUuWTRJH9B5
Lq7CzqNLgTivYiOOw7j6
=/BFZ
-----END PGP SIGNATURE-----

--nextPart4504067.j1e9o7yXOY--