Module: BSON::Config
Overview
Provides configuration options for the BSON library.
Instance Method Summary collapse
-
#validating_keys=(value) ⇒ true, false
Set the configuration option for BSON to validate keys or not.
-
#validating_keys? ⇒ true, false
Returns true if BSON will validate the document keys on serialization to determine if they contain invalid MongoDB values.
Instance Method Details
#validating_keys=(value) ⇒ true, false
Set the configuration option for BSON to validate keys or not.
33 34 35 |
# File 'lib/bson/config.rb', line 33 def validating_keys=(value) @validating_keys = value end |
#validating_keys? ⇒ true, false
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.
47 48 49 |
# File 'lib/bson/config.rb', line 47 def validating_keys? !!(@validating_keys||=nil) end |