Sha256: bc8744cc9d08397c1b9bb680ff53fd428903ccb2fd4ee579f5fbac161409a0a6

Contents?: true

Size: 732 Bytes

Versions: 25

Compression:

Stored size: 732 Bytes

Contents

# frozen_string_literal: true

module Mongoid
  module Errors

    # Raised when invalid options are used to create a persistence context.
    class InvalidPersistenceOption < MongoidError

      # Instantiate the persistence context option error.
      #
      # @example Create the error.
      #   InvalidPersistenceOption.new(:invalid_option, [ :connect_timeout, :database ])
      #
      # @param [ Symbol ] invalid The invalid option.
      # @param [ Array<Symbol> ] valid The allowed options.
      def initialize(invalid, valid)
        super(
            compose_message(
                "invalid_persistence_option",
                { invalid: invalid, valid: valid }
            )
        )
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
mongoid-8.1.8 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-8.1.7 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-8.1.6 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-8.0.8 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-8.1.5 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-8.1.4 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-8.0.7 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-8.1.3 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-8.1.2 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-8.0.6 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-7.5.4 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-8.1.1 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-8.0.5 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-8.1.0 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-7.5.3 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-8.0.4 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-8.0.3 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-7.5.2 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-8.0.2 lib/mongoid/errors/invalid_persistence_option.rb
mongoid-7.5.1 lib/mongoid/errors/invalid_persistence_option.rb