module Nasty::LambdaBehaviours

Public Instance Methods

memoize(lambda_method) click to toggle source
# File lib/nasty/lambda_behaviours.rb, line 3
def memoize(lambda_method)
  lambda { |*args| @cache ||= lambda_method.call(*args) }
end