Sha256: 8499619e333c07618b81af7297863473ec7b9c6cfdb8a7926fd8bd3b6c507f23

Contents?: true

Size: 630 Bytes

Versions: 14

Compression:

Stored size: 630 Bytes

Contents

# frozen_string_literal: true
# encoding: utf-8

module Mongoid
  module Errors

    # Creates the exception raised when trying to set or get the 
    # discriminator key on a child class.
    #
    # @param [ String ] class_name The class name.
    # @param [ String ] operator The class' superclass.
    #
    # @api private
    class InvalidDiscriminatorKeyTarget < MongoidError
      def initialize(class_name, superclass)
        super(
          compose_message(
            "invalid_discriminator_key_target",
            { class_name: class_name, superclass: superclass }
          )
        )
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mongoid-7.3.5 lib/mongoid/errors/invalid_discriminator_key_target.rb
mongoid-7.3.4 lib/mongoid/errors/invalid_discriminator_key_target.rb
mongoid-7.2.6 lib/mongoid/errors/invalid_discriminator_key_target.rb
mongoid-7.3.3 lib/mongoid/errors/invalid_discriminator_key_target.rb
mongoid-7.3.2 lib/mongoid/errors/invalid_discriminator_key_target.rb
mongoid-7.2.5 lib/mongoid/errors/invalid_discriminator_key_target.rb
mongoid-7.2.4 lib/mongoid/errors/invalid_discriminator_key_target.rb
mongoid-7.3.1 lib/mongoid/errors/invalid_discriminator_key_target.rb
mongoid-7.3.0 lib/mongoid/errors/invalid_discriminator_key_target.rb
mongoid-7.2.3 lib/mongoid/errors/invalid_discriminator_key_target.rb
mongoid-7.2.2 lib/mongoid/errors/invalid_discriminator_key_target.rb
mongoid-7.2.1 lib/mongoid/errors/invalid_discriminator_key_target.rb
mongoid-7.2.0 lib/mongoid/errors/invalid_discriminator_key_target.rb
mongoid-7.2.0.rc1 lib/mongoid/errors/invalid_discriminator_key_target.rb