instance method
watch_namespaces
Ruby on Rails 3.0.20
Since v3.0.20 Last seen in v6.1.7.10Signature
watch_namespaces(namespaces)
Add a set of modules to the watch stack, remembering the initial constants
Parameters
-
namespacesreq
Source
# File activesupport/lib/active_support/dependencies.rb, line 123
def watch_namespaces(namespaces)
watching = []
namespaces.map do |namespace|
module_name = Dependencies.to_constant_name(namespace)
original_constants = Dependencies.qualified_const_defined?(module_name) ?
Inflector.constantize(module_name).local_constant_names : []
watching << module_name
self[module_name] << original_constants
end
@watching << watching
end
Defined in activesupport/lib/active_support/dependencies.rb line 123
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Dependencies::WatchStack