mem 0.1.0 → 0.1.1
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/lib/mem.rb +4 -0
- data/lib/mem/version.rb +1 -1
- data/spec/mem_spec.rb +12 -1
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6ca181d52b428f217e48d148ca5f0e5e336d83f
|
4
|
+
data.tar.gz: 929cbdf292bf772d4d8bb670bea88bfce549fdfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3391b30516dbdd09d794f1127f8e46dbee602bd0670d3802ff6911e6a939d426639e14e3700085149bbb4d4e2753fbdd5be7af7f5bb987a719a645305cc80fe7
|
7
|
+
data.tar.gz: c4c11d2f1e1ffc7d8ec2c9aed618770a0d76cddfaf13677f865358ed1e5559b866dd494e325fc743097ceb6ad0b0356328d472ba16acc1f1fbe7e8430acb042a
|
data/CHANGELOG.md
CHANGED
data/lib/mem.rb
CHANGED
data/lib/mem/version.rb
CHANGED
data/spec/mem_spec.rb
CHANGED
@@ -19,6 +19,11 @@ describe Mem do
|
|
19
19
|
def b(value)
|
20
20
|
[value, yield]
|
21
21
|
end
|
22
|
+
|
23
|
+
def c
|
24
|
+
"c"
|
25
|
+
end
|
26
|
+
memoize :c
|
22
27
|
end
|
23
28
|
end
|
24
29
|
|
@@ -27,9 +32,15 @@ describe Mem do
|
|
27
32
|
expect(object.a(1) { 2 }).to eq [1, 2]
|
28
33
|
expect(object.a(3) { 4 }).to eq [1, 2]
|
29
34
|
end
|
35
|
+
|
36
|
+
it "defines setter" do
|
37
|
+
expect(object.c).to eq "c"
|
38
|
+
object.c = "d"
|
39
|
+
expect(object.c).to eq "d"
|
40
|
+
end
|
30
41
|
end
|
31
42
|
|
32
|
-
context "with
|
43
|
+
context "with abnormal method name" do
|
33
44
|
let(:klass) do
|
34
45
|
Class.new do
|
35
46
|
include Mem
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -59,7 +59,7 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
-
- .gitignore
|
62
|
+
- ".gitignore"
|
63
63
|
- CHANGELOG.md
|
64
64
|
- Gemfile
|
65
65
|
- LICENSE.txt
|
@@ -80,12 +80,12 @@ require_paths:
|
|
80
80
|
- lib
|
81
81
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
@@ -97,4 +97,3 @@ summary: Memoize any method call
|
|
97
97
|
test_files:
|
98
98
|
- spec/mem_spec.rb
|
99
99
|
- spec/spec_helper.rb
|
100
|
-
has_rdoc:
|