Hi all,
what do you guys think of making ActiveSupport::Memoizable aware of
the private keyword? Currently, if you memoize :a_method, the a_method
newly defined by Memoizable will always be public.
I've put an exemplary patch up on lighthouse which causes the re-
definition of a_method to be prepended by the private keyword if the
original a_method had been private.
I think the implementation is solid but of course the question arises
whether such behaviour is desired or not in the first place. What are
your opinions on this?
Ticket & patch are at
http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2138-teach-activesupportmemoizable-about-private-methods
Best,
Niels