From: matt@... (matt neuburg) Date: 2008-01-28T06:09:57+09:00 Subject: Re: method_defined? doesn't see module methods? Stefano Crocco wrote: > Alle Sunday 27 January 2008, matt neuburg ha scritto: > > module M > > def self.howdy > > "hello" > > end > > end > > p M.method_defined? :howdy #=> false > > > > What question should I ask in order to get "true"? Thx - m. > > To know whether the module has a module method, you can use respond_to? on the > module: > > M.respond_to?(:howdy) > => true Excellent, thanks! m. -- matt neuburg, phd = matt@tidbits.com, http://www.tidbits.com/matt/ Leopard - http://www.takecontrolbooks.com/leopard-customizing.html AppleScript - http://www.amazon.com/gp/product/0596102119 Read TidBITS! It's free and smart. http://www.tidbits.com