Sha256: 8fc2d541cb3780b7ff5f8a88468d2a5afa12d9894070aaef56eccda707f033b4

Contents?: true

Size: 594 Bytes

Versions: 4

Compression:

Stored size: 594 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Support
    module AbstractMethod
      module Exceptions
        class AbstractMethodNotOverridden < ::ConvenientService::Exception
          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
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
convenient_service-0.16.0 lib/convenient_service/support/abstract_method/exceptions.rb
convenient_service-0.15.0 lib/convenient_service/support/abstract_method/exceptions.rb
convenient_service-0.14.0 lib/convenient_service/support/abstract_method/exceptions.rb
convenient_service-0.13.0 lib/convenient_service/support/abstract_method/exceptions.rb