Module: Mongo::Config::Validators::Option Private

Extended by:
Option
Included in:
Option
Defined in:
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.

Validator for configuration options.

API:

  • private

Instance Method Summary collapse

Instance Method Details

#validate(option) ⇒ 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.

Validate a configuration option.

Examples:

Validate a configuration option.


Parameters:

  • The name of the option.

API:

  • private



19
20
21
22
23
# File 'lib/mongo/config/validators/option.rb', line 19

def validate(option)
  unless Config.settings.keys.include?(option.to_sym)
    raise Mongo::Error::InvalidConfigOption.new(option)
  end
end