From: Eric Hodel Date: 2003-07-31T15:18:35-07:00 Subject: Re: Extracting a parent class --PPYy/fEw/8QCHSq3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Michael Garriss (mgarriss@earthlink.net) wrote: > It is VERY possible that I should be doing it in another way. My=20 > motivation: I have a client/server arch. The server maintains objects= =20 > and a database. When the client needs something I do not want the=20 > client to have full access to all the info found in those server side=20 > objects. Some of it would be bad for the client to know. I have=20 > classes the client side can use and I add the additional things the=20 > server knows about the object by creating a subclass of the client class= =20 > and then just adding the one or two 'secret' members. Does this make sen= se? Perhaps containment would be a better solution than inheritance? class ClientThingy attr :foo, :bar, :baz end class ServerThingy attr :client_thingy def initialize @client_thingy =3D ClientThingy.new end end Also, have you looked at DRb? It will allow you to have a clean division between server-side and client-side. --=20 Eric Hodel - drbrain@segment7.net - http://segment7.net All messages signed with fingerprint: FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 --PPYy/fEw/8QCHSq3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/KZW7MypVHHlsnwQRAnDbAKDG0RrZ2NgrSTiuaH3VU+YvTfySIQCgpeCg kPJfa9/FQH4EDUYA85TUMVY= =05Le -----END PGP SIGNATURE----- --PPYy/fEw/8QCHSq3--