Module: Librarian::Support::AbstractMethod::ClassMethods

Defined in:
lib/librarian/support/abstract_method.rb

Instance Method Summary collapse

Instance Method Details

#abstract_method(*names) ⇒ Object



12
13
14
15
16
# File 'lib/librarian/support/abstract_method.rb', line 12

def abstract_method(*names)
  names.reject{|name| respond_to?(name)}.each do |name, *args|
    define_method(name) { raise Exception, "Method #{self.class.name}##{name} is abstract!" }
  end
end