callbacks_attachable 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/callbacks_attachable.rb +2 -2
- data/lib/callbacks_attachable/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: cde14954ee42182a68a68fb4f9d05bbd452c32d2
|
4
|
+
data.tar.gz: ca632ce300aa550cc02c2d3b454b4e90a09e6a49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 241435a5ee14e9df0eb0d708718578a8b0cf56afe0c514d9fd6832e4ec22ee010650c9486933cf8a96485ef96b32d150a08b254219000551937ef00bad5b3643
|
7
|
+
data.tar.gz: eaef9fce8abeb9134d20a9265e425bc7121cd33172a879b7b2b7e01d8e7005b81b7ca584b4b7ba4fb03a4efaa33a89d7b3db983644304d0648f324fbf0ceacfc
|
data/lib/callbacks_attachable.rb
CHANGED
@@ -36,9 +36,9 @@ module CallbacksAttachable
|
|
36
36
|
|
37
37
|
# dup the callback list so that removing callbacks while iterating does
|
38
38
|
# still call all callbacks during map.
|
39
|
-
callbacks[event].dup.
|
39
|
+
callbacks[event].dup.map do |callback|
|
40
40
|
context.instance_exec(*args, &callback) != false
|
41
|
-
end
|
41
|
+
end.all?
|
42
42
|
end
|
43
43
|
|
44
44
|
def off(event, callback)
|