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.

API:

  • private

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:

  • The configuration options.

API:

  • private



40
41
42
43
44
45
# File 'lib/mongo/config.rb', line 40

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