RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: szymko
I've seen recently a Gem for creating such method encapsulation like memoization. It's called MethodDecorators, inspired by actual decorators existing in Python, you can find it on Github.
It's very interesting because of its extensive usage of metaprogramming and the way author mimics features of another programming language.