From: "Mauricio Fernández" Date: 2003-01-23T01:57:28+09:00 Subject: Re: extend (Re: a single class that supports multiple facets/interfaces) On Thu, Jan 23, 2003 at 01:47:26AM +0900, Gavin Sinclair wrote: > > 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". You do probably already know it, but for the record, we have Object#extend (public) Module#include (private) The question is why are Module#include and Module#append_features private? > > Just wondering if I've got everything right, and if there's anything > else to learn about it. > > Gavin > -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com People disagree with me. I just ignore them. -- Linus Torvalds, regarding the use of C++ for the Linux kernel