module Bundler::Plugin
def add_hook(event, &block)
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