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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3edb077ec558a78e242e845f6c6f5e31466899e9261d3b25aa358ecd1ebb050f
4
- data.tar.gz: 409913bdf7ca41cf2c0089ea95e4118a32b37b8f7c6c94d77ae6799857b6631d
3
+ metadata.gz: e2028b3233247d37829ca68a1c6dfd5453f67c9cf4ef4635b46326f87deac4fe
4
+ data.tar.gz: 9f0f912ef276566c2eaaf3797646c0b495554643d3d4a0963d50e9da29c50257
5
5
  SHA512:
6
- metadata.gz: 04a66ae08e0cbcae7cf4eede6e4b482c187140669ccf7c9aff59cb65cd9dbb9602c890d14df65f6ccd5e9292d329498af9676c11bfeb9aa90569e3d3163c4942
7
- data.tar.gz: a5846b8b1054896839eae9280a4ae9674349fe404795bc9d93f04f6d998d5e3ac9974daecdb8420615e97c5e7e05c161dc1fd164e27b67fb49697a0901e1ee1e
6
+ metadata.gz: e4ef0ec2e74937c413b32f4610a12c03697b29108c34bc0dbc3799c3646cda95356beb5dc038f249010c74757efa28e3e2b6353552f84f8480564b7a77feed42
7
+ data.tar.gz: cf939fdae7f09497b44dd0fe5ec93002b0e68426c8cbd736eb9a04bf3f7a80d919e83bf0d83a2d3c798c251f2d5750ac99b75b1fb5ad291e7924c2e73403768e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- the_help (1.6.1)
4
+ the_help (1.6.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -53,4 +53,4 @@ DEPENDENCIES
53
53
  yard
54
54
 
55
55
  BUNDLED WITH
56
- 1.17.1
56
+ 1.17.3
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TheHelp
4
- VERSION = '1.6.1'
4
+ VERSION = '1.6.2'
5
5
  end
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.1
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-01-25 00:00:00.000000000 Z
11
+ date: 2019-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug