From: matz@... (Yukihiro Matsumoto) Date: 2001-05-11T13:49:34+09:00 Subject: [ruby-talk:14976] Re: Module [instance] methods, append_features, etc. Hi, In message "[ruby-talk:14971] Module [instance] methods, append_features, etc." on 01/05/11, "Hal E. Fulton" writes: |Q1. The module methods of that module do NOT become class |methods of the class. I'm not sure why that is. [ruby-talk:14845] |Q2. I found the "append_features" trick to create a class |method using a module... but now the module instance |methods don't show up as instance methods of the class. |(Listing 2 below.) Why? You didn't call "super" in append_feature. Unlike other "hook" methods, append_feature does the actual process of "include". You have "included" hook method in 1.7. |Q3. OK, maybe I don't "want" to bring in both class and instance |methods. Maybe I just "think I want it." I admit I don't have |an application in mind; I was just experimenting. Comments? It's very important to experiment. great. |Q4. Why is it allowable to have a method definition within |the append_features body but not a second one? A second one |gives me a "nested method" error. I'm not understanding |something pretty basic. You cannot define a method within a method definition, on the other hand you CAN define singleton method within a method. Hope this helps. matz.