From: "Mauricio Fernández" Date: 2004-04-20T06:27:54+09:00 Subject: Re: Class instance method can't be defined in a module? On Tue, Apr 20, 2004 at 06:21:27AM +0900, John Platte wrote: > On 2004 Apr 16, at 17:42, Mauricio Fern�ndez wrote: > > >>Trying to work some attr_accessor - style magic so I can refactor a > >>bunch of menial methods into a single declaration. Can't subclass, so > >>I'm trying to do it with a module...I can't figure out what I'm > >>missing... > > > > extend FooModule > > Thank you, Mauricio. This was indeed the fix I needed. > > I guess I don't understand the distinction between "include" and > "extend" from the descriptions in the Pickaxe. There's apparently a > conceptual difference? obj.extend Foo works like class << obj; include Foo end -- Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Linux is obsolete -- Andrew Tanenbaum