method
remove_constant
remove_constant(const)
public
Hide source
# File activesupport/lib/active_support/dependencies.rb, line 667 def remove_constant(const) #:nodoc: return false unless qualified_const_defined? const # Normalize ::Foo, Foo, Object::Foo, and ::Object::Foo to Object::Foo names = const.to_s.sub(/^::(Object)?/, 'Object::').split("::") to_remove = names.pop parent = Inflector.constantize(names * '::') log "removing constant #{const}" constantized = constantize(const) constantized.before_remove_const if constantized.respond_to?(:before_remove_const) parent.instance_eval { remove_const to_remove } return true end


