On Tue, Mar 24, 2009 at 4:38 AM, Fernando Perez <rails-mailing-l...@andreas-s.net> wrote: > > Jeremy McAnally wrote: >> They are likely marked ":nodoc:" in the source, which means RDoc is >> supposed to skip them. > Why is the documentation for these methods hidden from the public? The > method is still invokable. If really they wanted people to not know > about such methods and to prevent them from using them, why not make > these methods as protected/private or change how the encapsulation is > done?
Making them private doesn't make them inaccessible. In Ruby nothing is really private like one might expect from experience with Java or C++. > irb >> s = ' foo ' => " foo " >> s.private_methods.include? 'pp' => true >> s.pp NoMethodError: private method `pp' called for " foo ":String from (irb):3 from :0 >> s.send( :pp, ' foo ' ) " foo " => nil -- Greg Donald http://destiney.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---