From: Mario Ruiz Date: 2007-12-13T22:10:48+09:00 Subject: Re: method accesible only from another class I like very much the send option, and it works really well. I am only thinking in more possiblities. Thanks a lot. :) Stefano Crocco wrote: > Alle gioved狸 13 dicembre 2007, Mario Ruiz ha scritto: >> Maybe a solution can be if I write the classes inside a module and I can >> declare a method as private for this module, is it possible? > > No. There are private module methods, but they're another thing > enterely. A > private module method (or private class method) is a method which can > only be > called with the module as receiver. For example: > > module M > > def self.a_method > puts "a_method" > end > private_class_method :a_method > > end > > M.a_method > => NoMethodError: private method `a_method' called for M:Module. > > Why don't you like to use send as I suggested? > > Stefano -- Posted via http://www.ruby-forum.com/.