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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b74554af0366433cb7bcecddc081c5e906e0ab91
4
- data.tar.gz: 5c86c645b70577ea1fd03982f0aa4151245f40d0
3
+ metadata.gz: 69dae7a7a366f16dcda30e68c078448515665026
4
+ data.tar.gz: 2ef87cf2941e154930ae3eff7dc3b88f7d243db4
5
5
  SHA512:
6
- metadata.gz: 45b1e71f8b7b91c38977e9f3acd9d0e404cd12c05ee4dbba63b9a45331319acea6cf0d6ad572fe030a0523603fc23a735e5ec2be432c142a368f0ce71502899a
7
- data.tar.gz: 362bdae78978be2933f04696e7515229b4ce7988c95e2b280d06c6ddb626d0e0e19278e6c16a2319c302f3d6448e8231e58cc7fa0903c6ac4de9282cc9eb847e
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
@@ -1,3 +1,3 @@
1
1
  module CallbacksAttachable
2
- VERSION = "3.0.0"
2
+ VERSION = "3.0.1"
3
3
  end
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.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-10-22 00:00:00.000000000 Z
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