123456789_123456789_123456789_123456789_123456789_

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

Do not use. This module is for internal use only.
Relationships & Source Files
Defined in: lib/mongo/config/validators/option.rb

Overview

Validator for configuration options.

Instance Method Summary

Instance Method Details

#validate(option)

Validate a configuration option.

Examples:

Validate a configuration option.

Parameters:

  • option (String)

    The name of the option.

[ GitHub ]

  
# 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