Method: Mongo::Error::InvalidReplacementDocument.warn

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

.warn(logger, key) ⇒ Object

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.

Send and cache the warning.

Since:

  • 2.0.0



45
46
47
48
49
50
# File 'lib/mongo/error/invalid_replacement_document.rb', line 45

def self.warn(logger, key)
  @warned ||= begin
    logger.warn(message(key))
    true
  end
end