Module: Exlibris::Aleph::Abstract

Included in:
Rest::Base
Defined in:
lib/exlibris/aleph/abstract.rb

Overview

If a class is abstract, it can't be instantiated.

Defined Under Namespace

Modules: ClassAttributes

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object


7
8
9
10
11
# File 'lib/exlibris/aleph/abstract.rb', line 7

def self.included(klass)
  klass.class_eval do
    extend ClassAttributes
  end
end

Instance Method Details

#initialize(*args) ⇒ Object

Raises:

  • (NotImplementedError)

23
24
25
# File 'lib/exlibris/aleph/abstract.rb', line 23

def initialize *args
  raise NotImplementedError.new("Cannot instantiate #{self.class.name}.  It is abstract") if self.class.abstract?
end