iopromise 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/lib/iopromise.rb +4 -4
- data/lib/iopromise/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 323b4f0107580d674fa42c4f65644dcae302c822c9d370dd9e3effbf5b4c13eb
|
4
|
+
data.tar.gz: dc8b3937fea0505e598c0855ccc695b98dc837e221b8959a61acfbf18838c3b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8737b6c9a1e1ee2376f586ceca83a074679d6e0b53e073e07df8817f3f14fe261b606f5398618bcd984f2441b288b89fb9d660f499428d60c93cf35e7b561f7e
|
7
|
+
data.tar.gz: c82ed8d1da207ce2bfa766b8a1fd88aa4ba803565b749f4c77e0cb90a5b8f9c0289f60111260daf4acc5b7ddaae43b0ddcadd91212201778516b1637f9db2cb6
|
data/lib/iopromise.rb
CHANGED
@@ -36,18 +36,18 @@ module IOPromise
|
|
36
36
|
@started_executing
|
37
37
|
end
|
38
38
|
|
39
|
-
def notify_completion
|
40
|
-
@instrument_end.each { |cb| cb.call(self) }
|
39
|
+
def notify_completion(value: nil, reason: nil)
|
40
|
+
@instrument_end.each { |cb| cb.call(self, value: value, reason: reason) }
|
41
41
|
@instrument_end = []
|
42
42
|
end
|
43
43
|
|
44
44
|
def fulfill(value)
|
45
|
-
notify_completion
|
45
|
+
notify_completion(value: value)
|
46
46
|
super(value)
|
47
47
|
end
|
48
48
|
|
49
49
|
def reject(reason)
|
50
|
-
notify_completion
|
50
|
+
notify_completion(reason: reason)
|
51
51
|
super(reason)
|
52
52
|
end
|
53
53
|
end
|
data/lib/iopromise/version.rb
CHANGED