instance method
qualified_const_defined?
Ruby on Rails 5.0.7.2
Since v3.2.22.5 Last seen in v5.0.7.2Signature
qualified_const_defined?(path, search_parents=true)
No documentation comment.
Parameters
-
pathreq -
search_parentsopt = 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