easy_callbacks 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ceb97699a11533452e1ee8540212272daa3a97de
4
- data.tar.gz: d01f890f60e312bc0c2d4ea9e48e5144778eef5b
3
+ metadata.gz: b09b4fff39b736c6bc599a4fb61b0e54d8c7f8dd
4
+ data.tar.gz: 250aa6be5312574c712c17d4a42275327f0a84ae
5
5
  SHA512:
6
- metadata.gz: 6ba04e50f3856dd88118ffeb567142663a55338ccfd027d1713fcdcdeee17d615dfff58afb6a6e5ede4a6258eeb5d0d9496afe9fb4d008132a6775cbdf4fd56b
7
- data.tar.gz: 96a3664f627de73be0516c6058346a8b5fad63a49f200b7235473ffe78c5ce5299bab43faa568a0f815725139116ddb7c253f336af9c8a67743b2218d0591642
6
+ metadata.gz: 808b9a22c807276a1fca19634eb5b7ad731f69a9e1538d5b63b712fec636092ea08934856dc5e66e09f0f2bbb1f842732f1533ab4de9a7d4dc8853530b2f84ce
7
+ data.tar.gz: 1fcad291d78710340a367b33557f57b8bb6bc5c5ca4921ca36c3aa9bd55a03be763acc2f4fa3cbc73b794f3ccae5f7b05caca599706da571943260c13dc4b80e
data/changelog.txt CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.1.2
2
+
3
+ - setting 'execute_callbacks_for' (and related methods) as private
4
+
1
5
  # 0.1.1
2
6
 
3
7
  - fixing callbacks initialization bug: when trying to 'execute_callbacks_for' for a type (e.g. 'before') that doesn't
@@ -65,6 +65,8 @@ module EasyCallbacks
65
65
 
66
66
  end
67
67
 
68
+ private
69
+
68
70
  def execute_callbacks_for(type, target, additional_options, *args, &block)
69
71
  get_callbacks_for(type).select { |c| c[:target].eql? target }.each do |callback|
70
72
  cn = callback[:callback_name]
@@ -84,7 +86,7 @@ module EasyCallbacks
84
86
  send(cn, *arguments, &block)
85
87
  else
86
88
  arguments.last.merge! object: self
87
- proc.nil? ? send(cn, *arguments, &block) : proc.call(*arguments, &block)
89
+ proc.call(*arguments, &block)
88
90
  end
89
91
  end
90
92
  end
@@ -1,3 +1,3 @@
1
1
  module EasyCallbacks
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_callbacks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - r4z3c
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-23 00:00:00.000000000 Z
11
+ date: 2016-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler