koic/active_pstore

View on GitHub
lib/active_pstore/inheritance.rb

Summary

Maintainability
A
0 mins
Test Coverage
# -*- frozen-string-literal: true -*-

module ActivePStore
  module Inheritance
    def new(*args)
      if self == ActivePStore::Base
        raise NotImplementedError, "#{self} is an abstract class and cannot be instantiated."
      else
        super
      end
    end
  end
end