Sha256: eddf712f2efb9b2500e5a2a3789e4d0b0f52cab6d25cdeb8ab65ff515afbe972

Contents?: true

Size: 575 Bytes

Versions: 14

Compression:

Stored size: 575 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Support
    module AbstractMethod
      module Errors
        class AbstractMethodNotOverridden < ::StandardError
          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

14 entries across 14 versions & 1 rubygems

Version Path
convenient_service-0.11.0 lib/convenient_service/support/abstract_method/errors.rb
convenient_service-0.10.1 lib/convenient_service/support/abstract_method/errors.rb
convenient_service-0.10.0 lib/convenient_service/support/abstract_method/errors.rb
convenient_service-0.9.0 lib/convenient_service/support/abstract_method/errors.rb
convenient_service-0.8.0 lib/convenient_service/support/abstract_method/errors.rb
convenient_service-0.7.0 lib/convenient_service/support/abstract_method/errors.rb
convenient_service-0.6.0 lib/convenient_service/support/abstract_method/errors.rb
convenient_service-0.5.0 lib/convenient_service/support/abstract_method/errors.rb
convenient_service-0.4.0 lib/convenient_service/support/abstract_method/errors.rb
convenient_service-0.3.1 lib/convenient_service/support/abstract_method/errors.rb
convenient_service-0.3.0 lib/convenient_service/support/abstract_method/errors.rb
convenient_service-0.2.1 lib/convenient_service/support/abstract_method/errors.rb
convenient_service-0.2.0 lib/convenient_service/support/abstract_method/errors.rb
convenient_service-0.1.0 lib/convenient_service/support/abstract_method/errors.rb