From: Konrad Meyer Date: 2007-10-31T09:18:30+09:00 Subject: Re: Code to DRY --nextPart1425879.A7ij99IPBC Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Quoth Martin DeMello: > How about: >=20 > module Ordered > def le?(other) > case other > when MAX : true > when MIN : false > else > less_than_or_equal? other > end > end > end >=20 > class Klass1 > include Ordered >=20 > def less_than_or_equal? other > # stuff > end > end And instead of #le?, why not #<, #=3D=3D, #>, #<=3D>? =2D-=20 Konrad Meyer http://konrad.sobertillnoon.com/ --nextPart1425879.A7ij99IPBC Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBHJ8nUCHB0oCiR2cwRAn1zAJ9riBQMvWo63Q88T075oT3sDx5zeACdEtUH W3jett/oaEIm+cT5dIA6Tnc= =bK62 -----END PGP SIGNATURE----- --nextPart1425879.A7ij99IPBC--