Sha256: f1ac22c1fe472ef5733e41451a76f65334c987e8b1effa9aba393d5e86d1b256

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 Bytes

Contents

# encoding: utf-8

module Assertion

  # The exception to be raised when a Assertion attribute uses reserved name(s)
  #
  # @api public
  #
  class NameError < ::NameError

    # @!scope class
    # @!method new(*names)
    # Creates an exception instance
    #
    # @param [Symbol, Array<Symbol>] names Wrong names of attribute(s)
    #
    # @return [Assertion::NameError]
    #
    # @api private

    # @private
    def initialize(*names)
      super "Wrong name(s) for attribute(s): #{names.join(", ")}"
      freeze
    end

  end # class NameError

end # module Assertion

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
assertion-0.0.1 lib/assertion/exceptions/name_error.rb