From: Damphyr Date: 2006-12-06T18:50:51+09:00 Subject: Re: Passing the module name into the method definition Max Russell wrote: > I've been building a harness for running watir tests it looks lke this > currently- > > module CVLibrary > def CVLibrary.cv_login(testinstance, testaddress, testuser, > testpass, testldap) .... > What I don't understand is why, in the module, I'm explicitly having to > pass in it's own name? e.g. CVLibrary.cv_login You're defining a class method (e.g. static in other regions of the programming world). You actually don't have to pass the module name, and in the interests of refactoring it is also not advised. You are better off doing: def self.cv_login(...) If you define module CVLibrary def cv_login end end then you have an instance method, so you need to include the module in a class and then call the method from an instance of that class. Cheers, V.- -- http://www.braveworld.net/riva