async-service 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/service/environment.rb +13 -5
- data/lib/async/service/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8715972e602d996a04c5d8ed36f765eab4e4eda85c5f978cd9d10b66dc48fee3
|
4
|
+
data.tar.gz: abd69a1148bcb121887aef3943a1a7fea9916d88c8d683ba25f1572a8f869bbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e9618479dab469fdc62db4058a25bbe2eccbc2b1c33a6b44af7b277eaa030220cd25dd5b8d720e51b2d964ecd525d123d4d423965920d2c79b4119714a866db
|
7
|
+
data.tar.gz: c018787aef323da8805c471cc59a5a4fcbe21c83f789fbbbdd24cc37ff6c9b619f58dba04cf023390469632e72f9ccadb00498ef82f9198e50d691612e523b10
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -78,16 +78,24 @@ module Async
|
|
78
78
|
|
79
79
|
evaluator.include(facet)
|
80
80
|
|
81
|
+
keys = []
|
82
|
+
|
81
83
|
# Memoize all instance methods:
|
82
84
|
facet.instance_methods.each do |name|
|
83
|
-
|
84
|
-
|
85
|
+
instance_method = facet.instance_method(name)
|
86
|
+
|
87
|
+
# Only memoize methods with no arguments:
|
88
|
+
if instance_method.arity == 0
|
89
|
+
keys << name
|
90
|
+
|
91
|
+
evaluator.define_method(name) do
|
92
|
+
@cache[name] ||= super()
|
93
|
+
end
|
85
94
|
end
|
86
95
|
end
|
87
96
|
|
88
|
-
|
89
|
-
|
90
|
-
end
|
97
|
+
# This lists all zero-argument methods:
|
98
|
+
evaluator.define_method(:keys) {keys}
|
91
99
|
|
92
100
|
return evaluator.new
|
93
101
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|