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

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

Overview

Since:

  • 0.3.0

Instance Method Summary collapse

Constructor Details

#initialize(instance:, method:) ⇒ AbstractMethodNotOverridden

Returns a new instance of AbstractMethodNotOverridden.

Since:

  • 0.3.0



8
9
10
11
12
13
14
15
16
17
# File 'lib/convenient_service/support/abstract_method/exceptions.rb', line 8

def initialize(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

  super(message)
end