Method: Mongo::Server::AppMetadata::Platform#purpose

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

#purposeString | nil

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.

Returns a single letter representing the purpose reported to the metadata, or nil if no purpose was specified.

Returns:

  • (String | nil)

    the code representing the purpose

Since:

  • 2.0.0



91
92
93
94
95
# File 'lib/mongo/server/app_metadata/platform.rb', line 91

def purpose
  return nil unless .purpose

  .purpose.to_s[0].upcase
end