123456789_123456789_123456789_123456789_123456789_

Module: Mongo::Config Private

Do not use. This module is for internal use only.
Relationships & Source Files
Namespace Children
Modules:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Options, Forwardable, self
Defined in: lib/mongo/config.rb,
lib/mongo/config/options.rb,
lib/mongo/config/validators/option.rb

Overview

This module defines configuration options for ::Mongo.

Class Method Summary

Options - Extended

defaults

Get the defaults or initialize a new empty hash.

option

Define a configuration option with a default.

reset

Reset the configuration options to the defaults.

settings

Get the settings or initialize a new empty hash.

Instance Attribute Summary

Instance Attribute Details

#options=(options) (writeonly)

Set the configuration options.

Examples:

Set the options.

config.options = { validate_update_replace: true }

Parameters:

  • options (Hash)

    The configuration options.

[ GitHub ]

  
# 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