From: 7stud -- Date: 2007-09-10T20:34:52+09:00 Subject: Re: module_function :func vs. MyModule.func? Thanks for all the help. Here is a summary of the problem and solution: module Test def Test.show puts "testing" end def f puts "goodbye" end end Test.show #testing Test.f #error include Test f #goodbye show #error As the example above shows, there is no way to achieve both of the following: 1) When the Test module isn't included in order to avoid potential name clashes of Test's methods with other methods having the same name, being able to call all the methods using the syntax: Test.name. 2) When the Test module is included in order to avoid having to to type the module name in front of the method names and name clashes aren't a concern, being able to call all the methods using the syntax: name. module_function allows you to achieve both 1 and 2: module Test def show puts "testing" end def f puts "goodbye" end module_function :show, :f end Test.show #testing Test.f #goodbye include Test show #testing f #goodbye -- Posted via http://www.ruby-forum.com/.