class Mongo::Auth::InvalidMechanism

Raised when trying to get an invalid authorization mechanism.

@since 2.0.0

Public Class Methods

new(mechanism) click to toggle source

Instantiate the new error.

@example Instantiate the error.

Mongo::Auth::InvalidMechanism.new(:test)

@param [ Symbol ] mechanism The provided mechanism.

@since 2.0.0

Calls superclass method
# File lib/mongo/auth.rb, line 91
def initialize(mechanism)
  super("#{mechanism.inspect} is invalid, please use mongodb_cr, mongodb_x509, gssapi or plain.")
end