lib/bumbler/hooks.rb in bumbler-0.8.0 vs lib/bumbler/hooks.rb in bumbler-0.9.0
- old
+ new
@@ -25,11 +25,11 @@
define_method(:require) do |path, *args|
::Bumbler::Hooks.handle_require(path) do
orig_instance_require.bind(self).call(path, *args)
end
end
- private :require # rubocop:disable Style/AccessModifierDeclarations
+ private :require
end
@hooking_instance_require = nil
end
@@ -52,16 +52,16 @@
# Even better: Other gems hook require as well. The instance method one at least.
def watch_require!
::Kernel.module_eval do
# It isn't previously defined in Kernel. This could be a bit dangerous, though.
- def self.method_added(method_name, *_args)
+ def self.method_added(method_name, *_args) # rubocop:disable Lint/MissingSuper
if method_name == :require && !Bumbler::Hooks.hooking_instance_require?
::Bumbler::Hooks.hook_instance_require!
end
end
- def self.singleton_method_added(method_name, *_args)
+ def self.singleton_method_added(method_name, *_args) # rubocop:disable Lint/MissingSuper
if method_name == :require && !Bumbler::Hooks.hooking_singleton_require?
::Bumbler::Hooks.hook_singleton_require!
end
end
end