From: Suraj Kurapati Date: 2009-04-18T08:18:08+09:00 Subject: Re: simple module method call question James Coglan wrote: > You've defined an instance method, not a module method. The method as > you define it will appear in classes that use 'include Utils'. To get a > module method, define it on self: > > module Utils > MENU = [ ... ] > > def self.orph_chk > # ... > end > end Alternatively, you could use module_function() to make the instance method a class method on the module: module Utils def orph_chk # ... end module_function :orph_chk end Now you can either call the method directly (Utils.orph_chk) or mix it in (include Utils; orph_chk). So you can have your cake and eat it too! -- Posted via http://www.ruby-forum.com/.