lib/mongoid/config.rb
# Get database client that respects global overrides
# Config.override_database and Config.override_client.
#
# @return [Mongo::Client] Client according to global overrides.
Get database client that respects global overrides
Config.override_database and Config.override_client.
Get database client that respects global overrides Config . override_database and Config . override_client .
def global_client
      client =  if Threaded.client_override
                  Clients.with_name(Threaded.client_override)
                else
                  Clients.default
                end
      if Threaded.database_override
        client.use(Threaded.database_override)
      else
        client
      end
    end
def global_client client = if Threaded . client_override Clients . with_name ( Threaded . client_override ) else Clients . default end if Threaded . database_override client . use ( Threaded . database_override ) else client end end
Get database client that respects global overrides
Config.override_database and Config.override_client.
Get database client that respects global overrides Config . override_database and Config . override_client .
Client according to global overrides.
Client according to global overrides .
Mongo::Client