This method is only available on newer versions.
The first available version (v2_6_3) is shown here.
add_hook(event, &block)
public
To be called via the API to register a
hooks and corresponding block that will be called to handle the hook
# File lib/bundler/plugin.rb, line 158
def add_hook(event, &block)
unless Events.defined_event?(event)
raise ArgumentError, "Event '#{event}' not defined in Bundler::Plugin::Events"
end
@hooks_by_event[event.to_s] << block
end