instance method qualified_const_defined?

Ruby on Rails 5.0.7.2

Since v3.2.22.5 Last seen in v5.0.7.2

Available in: v3.2.22.5 v4.0.13 v4.1.16 v4.2.11.3 v5.0.7.2

Signature

qualified_const_defined?(path, search_parents=true)

No documentation comment.

Parameters

path req
search_parents opt = true
Source
# File activesupport/lib/active_support/core_ext/module/qualified_const.rb, line 29
  def qualified_const_defined?(path, search_parents=true)
    ActiveSupport::Deprecation.warn(<<-MESSAGE.squish)
      Module#qualified_const_defined? is deprecated in favour of the builtin
      Module#const_defined? and will be removed in Rails 5.1.
    MESSAGE

    ActiveSupport::QualifiedConstUtils.raise_if_absolute(path)

    ActiveSupport::QualifiedConstUtils.names(path).inject(self) do |mod, name|
      return unless mod.const_defined?(name, search_parents)
      mod.const_get(name)
    end
    return true
  end

Defined in activesupport/lib/active_support/core_ext/module/qualified_const.rb line 29 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Module

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close