Method: Mongo::Server::AppMetadata#initialize
- Defined in:
- lib/mongo/server/app_metadata.rb
#initialize(options = {}) ⇒ AppMetadata
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.
Instantiate the new AppMetadata object.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/mongo/server/app_metadata.rb', line 74 def initialize( = {}) @app_name = [:app_name].to_s if [:app_name] @platform = [:platform] @purpose = check_purpose!([:purpose]) @compressors = [:compressors] || [] @wrapping_libraries = [:wrapping_libraries] @server_api = [:server_api] return unless [:user] && ![:auth_mech] auth_db = [:auth_source] || 'admin' @request_auth_mech = "#{auth_db}.#{options[:user]}" end |