From: Kent Dahl Date: 2002-05-04T23:31:21+09:00 Subject: Re: Class methods defined in a module, how-to ? Jean-Hugues ROBERT wrote: > > At 20:31 04/05/2002 +0900, you wrote: > > module MyModule > > def foo() > > print "foo" > > end > > end > > class MyClass > > extend MyModule > > end > > MyClass.foo() # work :-) > > > > > >Guy Decoux > > Thanks. However I would like to *include* the module, not extending it. You aren't extending the Module. You are extending MyClass with the contents of the module. Sounds like you need to split up your module in a part you want to include (instance methods) and a part you want to extend your class with (class methods). -- (\[ Kent Dahl ]/)_ _~_ __[ http://www.stud.ntnu.no/~kentda/ ]___/~ ))\_student_/(( \__d L b__/ NTNU - graduate engineering - 4. year ) ( \__\_�|�_/__/ ) _)Industrial economics and technological management( \____/_�_\____/ (____engineering.discipline_=_Computer::Technology___)