Module: Mongo::Config Private

Extended by:
Forwardable, Config, Options
Included in:
Config
Defined in:
build/ruby-driver-v2.19/lib/mongo/config.rb,
build/ruby-driver-v2.19/lib/mongo/config/options.rb,
build/ruby-driver-v2.19/lib/mongo/config/validators/option.rb

Overview

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

This module defines configuration options for Mongo.

Defined Under Namespace

Modules: Options, Validators

Instance Method Summary collapse

Methods included from Options

defaults, option, reset, settings

Instance Method Details

#options=(options) ⇒ Object

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.

Set the configuration options.

Examples:

Set the options.

config.options = { validate_update_replace: true }

Parameters:

  • options (Hash)

    The configuration options.



36
37
38
39
40
41
# File 'build/ruby-driver-v2.19/lib/mongo/config.rb', line 36

def options=(options)
  options.each_pair do |option, value|
    Validators::Option.validate(option)
    send("#{option}=", value)
  end
end