instance method
watch_namespaces
Ruby on Rails 4.1.16
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 138
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_constants : []
@stack[module_name] << original_constants
module_name
end
end
Defined in activesupport/lib/active_support/dependencies.rb line 138
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Dependencies::WatchStack