https://github.com/svenfuchs/memoize
Simplistic memoization using instance variables
https://github.com/svenfuchs/memoize
Last synced: 3 months ago
JSON representation
Simplistic memoization using instance variables
- Host: GitHub
- URL: https://github.com/svenfuchs/memoize
- Owner: svenfuchs
- License: mit
- Created: 2019-04-22T18:24:21.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-14T22:00:05.000Z (about 6 years ago)
- Last Synced: 2025-03-09T05:48:36.362Z (4 months ago)
- Language: Ruby
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Memoize [](https://travis-ci.org/svenfuchs/memoize)
Simplistic memoization using instance variables.
## Installation
```
gem install
```## Usage
```ruby
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 bar
# expensive operation
end
end
```