Exception: ConvenientService::Support::AbstractMethod::Exceptions::AbstractMethodNotOverridden Private

Inherits:
Exception
  • Object
show all
Defined in:
lib/convenient_service/support/abstract_method/exceptions.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Instance Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

#initialize_with_kwargs(instance:, method:) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • instance (Object)

    Can be any type.

  • method (Symbol, String)

Since:

  • 1.0.0



18
19
20
21
22
23
24
25
26
27
# File 'lib/convenient_service/support/abstract_method/exceptions.rb', line 18

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