From: Henning VON ROSEN Date: 2001-04-27T03:20:06+09:00 Subject: [ruby-talk:14266] how change instances class This is a multi-part message in MIME format. ------=_NextPart_000_0000_01C0CE8E.75E08460 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Sorry, din't find it in pickaxe: (1) How(if possible) can I change the value of the class attribute? Say, that a instance at first is known as belonging to a fairly general class, and when we gather more information, it turns out to belong more precisely to a subclass. Is this part of Ruby 'as is', or do I have to extend. Point is to keep instance id, while the knowledge of which class it belongs to changes. Just like in real world as reflected in human language. (Changing to a subclass might be readily accepted, while changing to an unrelated class would demand an admittance that the first guess was an error.) (2) How do I delete (un-mix) a mixin? Thanks for any helpful comments/pointers. amike via Henning ------=_NextPart_000_0000_01C0CE8E.75E08460 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Sorry, = din't find it=20 in pickaxe:
 
(1)=20 How(if=20 possible) can I change the value of the class = attribute?
 
Say, = that a instance=20 at first is known as belonging to a fairly general class, and when = we=20 gather more information, it turns out to belong more precisely to a=20 subclass.
 
Is = this part of Ruby=20 'as is', or do I have to extend. Point is to keep instance id, while the = knowledge of which class it belongs to changes. Just like in real = world as=20 reflected in human language. (Changing to a subclass might be readily = accepted,=20 while changing to an unrelated class would demand an admittance = that the=20 first guess was an error.)
 
(2) = How do I=20 delete (un-mix) a mixin?
 
Thanks = for any=20 helpful comments/pointers.
 
amike = via=20 Henning
 

 

 
------=_NextPart_000_0000_01C0CE8E.75E08460--