instance method watch_namespaces

Ruby on Rails 3.2.22.5

Since v3.0.20 Last seen in v6.1.7.10

Available in: v3.0.20 v3.1.12 v3.2.22.5 v4.0.13 v4.1.16 v4.2.9 v5.2.8.1 v6.0.6 v6.1.7.10

Signature

watch_namespaces(namespaces)

Add a set of modules to the watch stack, remembering the initial constants

Parameters

namespaces req
Source
# File activesupport/lib/active_support/dependencies.rb, line 131
      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
          @stack[module_name] << original_constants
        end
        @watching << watching
      end

Defined in activesupport/lib/active_support/dependencies.rb line 131 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Dependencies::WatchStack

Type at least 2 characters to search.

↑↓ navigate · open · esc close