module Bundler::Plugin::Events

def self.define(const, event)

def self.define(const, event)
  const = const.to_sym.freeze
  if const_defined?(const) && const_get(const) != event
    raise ArgumentError, "Attempting to reassign #{const} to a different value"
  end
  const_set(const, event) unless const_defined?(const)
  @events ||= {}
  @events[event] = const
end