Class: Mongo::Options::RedactedHash Private

Inherits:
Hash
  • Object
show all
Includes:
RedactedRepresentation
Defined in:
lib/mongo/options/redacted.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

A plain Hash whose string and serialized representations redact sensitive values.

Unlike Redacted, which is a BSON::Document and normalizes its keys to strings, this class preserves the keys exactly as they were inserted. It is used for option hashes whose key types are part of the driver's observable behavior. Accessing the hash returns the real values; deserializing a representation with sensitive values raises ArgumentError.

Constant Summary

Constants included from RedactedRepresentation

Mongo::Options::RedactedRepresentation::LEGACY_SERIALIZATION_ERROR, Mongo::Options::RedactedRepresentation::REDACTED_SERIALIZATION_ERROR, Mongo::Options::RedactedRepresentation::SERIALIZATION_OPTIONS_KEY, Mongo::Options::RedactedRepresentation::SERIALIZATION_REDACTED_KEY

Method Summary

Methods included from RedactedRepresentation

#as_extended_json, #as_json, #encode_with, #init_with, #inspect, #marshal_dump, #marshal_load, #pretty_print, #to_extended_json, #to_json, #to_s