Method: Mongo::Error::InvalidReplacementDocument.message

Defined in:
lib/mongo/error/invalid_replacement_document.rb

.message(key) ⇒ String

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

Construct the error message.

Parameters:

  • key (String)

    The invalid key.

Returns:

  • (String)

    The error message.

Since:

  • 2.0.0



36
37
38
39
40
# File 'lib/mongo/error/invalid_replacement_document.rb', line 36

def self.message(key)
  message = "Invalid replacement document provided. Replacement documents "
  message += "must not contain atomic modifiers. The \"#{key}\" key is invalid."
  message
end