Method: Mongo::Server::AppMetadata::Environment#to_h

Defined in:
lib/mongo/server/app_metadata/environment.rb

#to_hHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Compiles the detected environment information into a Hash.

Returns:

  • (Hash)

    the detected environment information.

Since:

  • 2.0.0



191
192
193
# File 'lib/mongo/server/app_metadata/environment.rb', line 191

def to_h
  name ? fields.merge(name: name) : fields
end