Sha256: 5e96667e03ac8f1098624baf3f09a80fad3f22ded380600f083de95667f67a1c
Contents?: true
Size: 513 Bytes
Versions: 4
Compression:
Stored size: 513 Bytes
Contents
# frozen_string_literal: true require_relative "abstract_method/exceptions" module ConvenientService module Support module AbstractMethod include Support::Concern class_methods do 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 end end end end
Version data entries
4 entries across 4 versions & 1 rubygems