module BSON::Config
Provides configuration options for the BSON
library.
@since 4.1.0
Public Instance Methods
validating_keys=(value)
click to toggle source
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
# File lib/bson/config.rb, line 33 def validating_keys=(value) @validating_keys = value end
validating_keys?()
click to toggle source
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
# File lib/bson/config.rb, line 47 def validating_keys? !!(@validating_keys||=nil) end