Module: Veritas::AbstractClass::ClassMethods
- Defined in:
- lib/veritas/support/abstract_class.rb
Instance Method Summary collapse
-
#new ⇒ Object
Instantiate a new object.
Instance Method Details
#new ⇒ Object
Instantiate a new object
Ensures that the instance cannot be of the abstract class and must be a descendant.
33 34 35 36 37 38 39 |
# File 'lib/veritas/support/abstract_class.rb', line 33 def new(*) if superclass.equal?(Object) raise NotImplementedError, "#{self} is an abstract class" else super end end |