# Memoize the method +name+. If +file+ is provided, then the method results
# are stored on disk as well as in memory.
def memoize(name, file=nil)
cache = File.open(file, "rb"){ |io| Marshal.load(io) } rescue {}
(class< |
# Memoize the method +name+. If +file+ is provided, then the method results
# are stored on disk as well as in memory.
def memoize(name, file=nil)
cache = File.open(file, "rb"){ |io| Marshal.load(io) } rescue {}
(class< |