From: Gavin Sinclair Date: 2003-01-23T01:47:26+09:00 Subject: Re: extend (Re: a single class that supports multiple facets/interfaces) On Wednesday, January 22, 2003, 9:30:52 PM, ts wrote: >>>>>> "D" == David Garamond writes: D>> thanks. so as i see it, 'extend' is like 'include' but operates at the D>> object level (while 'include' usually works at the class level), right? > Well, it's perhaps best if you see that #extend work at singleton level > For example > class A > extend M > end Is A.extend M a shortcut for this? Practically it seems to be, and theoretically it should be, since "class A" sets "self" to "A". So is there a shortcut for class A include M end ? The logic above appears to apply, but A.include M fails because "private method `include' called for A:Class". Just wondering if I've got everything right, and if there's anything else to learn about it. Gavin