method
define
v2_6_3 -
Show latest stable
- Class:
Bundler::Plugin::Events
define(const, event)private
No documentation available.
# File lib/bundler/plugin/events.rb, line 6
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