Memoize
Simplistic memoization using instance variables.
Installation
gem install
Usage
require 'memoize'
class Obj
include Memoize
# on a separate line, after the method definition
def foo
# expensive operation
end
memoize :foo
# on one line, before the method definition
memoize def
# expensive operation
end
end