Memoize method in Ruby
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib tagged 0.3.0 Oct 30, 2015
spec Whitespace Sep 29, 2015
.gitignore Initial Dec 14, 2014
.travis.yml build on more modern jruby Oct 30, 2015
Gemfile Initial Dec 14, 2014
LICENSE.txt Initial Dec 14, 2014
README.md Add some badges Oct 30, 2015
Rakefile Add default rake task Oct 30, 2015
memoit.gemspec Require Ruby 2.1 Dec 14, 2014

README.md

Memoit

Gem Version Build Status

Memoizes methods.

Installation

Add this line to your application's Gemfile:

gem 'memoit'

Usage

class Foo
  memoize def bar(value)
    expensive_calculation(value)
  end

  memoize_class_method def self.baz(value)
    expensive_calculation(value)
  end
end

Is it any good?

Yes.

License

MIT