method

const_get_safely

ruby latest stable - Class: Bundler::SharedHelpers

Method not available on this version

This method is only available on newer versions. The first available version (v2_6_3) is shown here.

const_get_safely(constant_name, namespace)
public

No documentation available.

# File lib/bundler/shared_helpers.rb, line 135
    def const_get_safely(constant_name, namespace)
      const_in_namespace = namespace.constants.include?(constant_name.to_s) ||
        namespace.constants.include?(constant_name.to_sym)
      return nil unless const_in_namespace
      namespace.const_get(constant_name)
    end