Method not available on this version
This method is only available on newer versions.
The first available version (v2_6_3) is shown here.
hook(event, *args, &arg_blk)
public
Runs all the hooks that are registered for the passed event
It passes the passed arguments and block to the block registered with the
api.
@param [String] event
# File lib/bundler/plugin.rb, line 171
def hook(event, *args, &arg_blk)
return unless Bundler.feature_flag.plugins?
unless Events.defined_event?(event)
raise ArgumentError, "Event '#{event}' not defined in Bundler::Plugin::Events"
end
plugins = index.hook_plugins(event)
return unless plugins.any?
(plugins - @loaded_plugin_names).each {|name| load_plugin(name) }
@hooks_by_event[event].each {|blk| blk.call(*args, &arg_blk) }
end