callbacks_attachable 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/all/callback.rb +1 -1
- data/lib/all/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69dae7a7a366f16dcda30e68c078448515665026
|
4
|
+
data.tar.gz: 2ef87cf2941e154930ae3eff7dc3b88f7d243db4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ceae272ec6da0a87b89acd06a2906c8c24869d5d44118cd35efe74dfdcf295bcd1908c09f387d368d71dcdeeae15a1e0db2268a7b045f90ffa25e57da8391ea
|
7
|
+
data.tar.gz: 245ab9bff43abde87037344a4d251350b4da741c6247b659750cb80ddf6d04fe0082d55bc4e44d98aa71a908c8511008e175a51171397ef511deea82aa1c154a
|
data/lib/all/callback.rb
CHANGED
@@ -10,12 +10,12 @@ module CallbacksAttachable
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def call(instance, args)
|
13
|
+
cancel if @once
|
13
14
|
if @instance_scope
|
14
15
|
instance.instance_exec(*args, &@callback)
|
15
16
|
else
|
16
17
|
@callback.call(*args)
|
17
18
|
end
|
18
|
-
cancel if @once
|
19
19
|
end
|
20
20
|
|
21
21
|
def on_cancel(&on_cancel)
|
data/lib/all/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: callbacks_attachable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Aue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
Attach callbacks to classes to be triggered for all instances or attach them
|