Module: ConvenientService::Support::AbstractMethod

Defined Under Namespace

Modules: Exceptions

Class Method Summary collapse

Class Method Details

.abstract_method(*names) ⇒ Object



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

def abstract_method(*names)
  names.each do |name|
    define_method(name) do |*args, **kwargs, &block|
      ::ConvenientService.raise Exceptions::AbstractMethodNotOverridden.new(instance: self, method: name)
    end
  end
end