mem 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +17 -1
- data/lib/mem/core_ext.rb +2 -0
- data/lib/mem/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be1e9f31995ff9a66dd6e93d6adbdee9532073f4
|
4
|
+
data.tar.gz: 1e9b78d932ed38142364508403e9302574ad0ec5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aedfaa4c3e4b4f0bdd7d02b03f1b07c2b3f185a8fc8ce4d641077ab1cb732060b7e12e865d4d8d0462f0c573c0fc4fe420a692700226527a6adae3f05bd9593
|
7
|
+
data.tar.gz: 19fa71af0132cbb284bbf7e31f56dd452e90c35b8183a0714cbe4e0c3902bc3ebf45cdd11abbcf3c995491bb4cdc48d8e57a7388ba2940f91163ff73235429a1
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -40,5 +40,21 @@ foo.memoized_table #=> { bar: 1 }
|
|
40
40
|
```
|
41
41
|
|
42
42
|
### core ext
|
43
|
-
|
43
|
+
You can `require "mem/core_ext"` to skip `include Mem`,
|
44
44
|
while this extends Object class.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
require "mem/core_ext"
|
48
|
+
|
49
|
+
class A
|
50
|
+
def x
|
51
|
+
puts 1
|
52
|
+
end
|
53
|
+
memoize :x
|
54
|
+
end
|
55
|
+
|
56
|
+
a = A.new
|
57
|
+
a.x #=> 1
|
58
|
+
a.x #=> nothing logged out
|
59
|
+
a.x #=> nothing logged out
|
60
|
+
```
|
data/lib/mem/core_ext.rb
CHANGED
data/lib/mem/version.rb
CHANGED