memoist2
Simple Memoization for Ruby 2.0
Example
Memoize an instance method
class Foo include Memoist2
def
sleep 1 && 2**10
end
memoize :bar
end
Memoize a class method
class Foo include Memoist2
def self.
# something expensive
end
memoize_class_method :bar
end
Licence
Licensed under the MIT licence.
See the file LICENCE.