Module: Mongo::Config Private

Extended by:
Forwardable, Config, Options
Included in:
Config
Defined in:
lib/mongo/config.rb,
lib/mongo/config/options.rb,
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 'lib/mongo/config.rb', line 36

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