Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svenfuchs/memoize
Simplistic memoization using instance variables
https://github.com/svenfuchs/memoize
Last synced: 12 days 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-14T22:00:05.000Z (over 5 years ago)
- Last Synced: 2024-10-26T22:39:38.133Z (2 months ago)
- Language: Ruby
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Memoize [![Build Status](https://travis-ci.org/svenfuchs/memoize.svg?branch=master)](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
```