module BSON::Config
Provides configuration options for the BSON
library.
@since 4.1.0
Public Instance Methods
Source
# File lib/bson/config.rb, line 34 def validating_keys=(value) @validating_keys = value end
Set the configuration option for BSON
to validate keys or not.
@example Set the config option.
BSON::Config.validating_keys = true
@param [ true, false ] value The value to set.
@return [ true, false ] The value.
@since 4.1.0
Source
# File lib/bson/config.rb, line 48 def validating_keys? !!(@validating_keys||=nil) end
Returns true if BSON
will validate the document keys on serialization to determine if they contain invalid MongoDB values. Invalid keys start with ‘$’ or contain a ‘.’ in them.
@example Is BSON
validating keys?
BSON::Config.validating_keys?
@return [ true, false ] If BSON
is validating keys?
@since 4.1.0