Sha256: 21d5c4f8f1b040c73322b92e1793cb138c46bba9b1c41d6b6639db51a4937458

Contents?: true

Size: 611 Bytes

Versions: 4

Compression:

Stored size: 611 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Support
    module AbstractMethod
      module Exceptions
        class AbstractMethodNotOverridden < ::ConvenientService::Exception
          def initialize_with_kwargs(instance:, method:)
            klass = instance.is_a?(::Class) ? instance : instance.class
            method_type = Utils::Object.resolve_type(instance)

            message = <<~TEXT
              `#{klass}` should implement abstract #{method_type} method `#{method}`.
            TEXT

            initialize(message)
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/support/abstract_method/exceptions.rb
convenient_service-0.19.0 lib/convenient_service/support/abstract_method/exceptions.rb
convenient_service-0.18.0 lib/convenient_service/support/abstract_method/exceptions.rb
convenient_service-0.17.0 lib/convenient_service/support/abstract_method/exceptions.rb