the_help 1.6.1 → 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/the_help/provides_callbacks.rb +17 -4
- data/lib/the_help/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2028b3233247d37829ca68a1c6dfd5453f67c9cf4ef4635b46326f87deac4fe
|
4
|
+
data.tar.gz: 9f0f912ef276566c2eaaf3797646c0b495554643d3d4a0963d50e9da29c50257
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4ef0ec2e74937c413b32f4610a12c03697b29108c34bc0dbc3799c3646cda95356beb5dc038f249010c74757efa28e3e2b6353552f84f8480564b7a77feed42
|
7
|
+
data.tar.gz: cf939fdae7f09497b44dd0fe5ec93002b0e68426c8cbd736eb9a04bf3f7a80d919e83bf0d83a2d3c798c251f2d5750ac99b75b1fb5ad291e7924c2e73403768e
|
data/Gemfile.lock
CHANGED
@@ -64,6 +64,14 @@ module TheHelp
|
|
64
64
|
# Classes that include ProvidesCallbacks are extended with these
|
65
65
|
# ClassMethods
|
66
66
|
module ClassMethods
|
67
|
+
protected
|
68
|
+
|
69
|
+
def _provides_callbacks_callback_defined?(name, check_ancestors: true)
|
70
|
+
_provides_callbacks_defined_callbacks.include?(name.to_sym) ||
|
71
|
+
(check_ancestors &&
|
72
|
+
_provides_callbacks_superclass_callback_defined?(name))
|
73
|
+
end
|
74
|
+
|
67
75
|
private
|
68
76
|
|
69
77
|
# Defines a callback method on the class
|
@@ -88,14 +96,19 @@ module TheHelp
|
|
88
96
|
self
|
89
97
|
end
|
90
98
|
|
91
|
-
def _provides_callbacks_callback_defined?(name)
|
92
|
-
_provides_callbacks_defined_callbacks.include?(name.to_sym)
|
93
|
-
end
|
94
|
-
|
95
99
|
def _provides_callbacks_defined_callbacks
|
96
100
|
@_provides_callbacks_defined_callbacks ||= Set.new
|
97
101
|
end
|
98
102
|
|
103
|
+
def _provides_callbacks_superclass_callback_defined?(name)
|
104
|
+
ancestors.any? { |ancestor|
|
105
|
+
ancestor.include?(TheHelp::ProvidesCallbacks) &&
|
106
|
+
ancestor._provides_callbacks_callback_defined?(
|
107
|
+
name, check_ancestors: false
|
108
|
+
)
|
109
|
+
}
|
110
|
+
end
|
111
|
+
|
99
112
|
def _provides_callbacks_method_defined?(name)
|
100
113
|
method_defined?(name) || private_method_defined?(name)
|
101
114
|
end
|
data/lib/the_help/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: the_help
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Wilger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|