module Bundler::Plugin

def add_hook(event, &block)

will be called to handle the hook
To be called via the API to register a hooks and corresponding block that
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