Module Uninheritable
In: lib/more/facets/uninheritable.rb

Uninheritable

Allows an object to declare itself as unable to be subclassed. The technique behind this is very simple (redefinition of inherited), so this just provides an easier way to do the same thing with a consistent error message.

Methods

inherited  

Public Instance methods

Redefines a class‘s inherited definition to prevent subclassing of the class extended by this module.

[Source]

# File lib/more/facets/uninheritable.rb, line 46
  def inherited(klass)
    raise TypeError, "Class #{self} cannot be subclassed."
  end

[Validate]