| Class | Module |
| In: |
lib/abstract_method.rb
|
| Parent: | Object |
Defines one or more abstract methods with given names in a class or module. When called, the abstract method will raise an `AbstractMethodCalled` exception with a helpful message.
@example
class AbstractClass
abstract_method :foo
end
class ConcreteClass < AbstractClass
def foo
42
end
end
AbstractClass.new.foo # raises AbstractMethodCalled
ConcreteClass.new.foo # => 42
@param [Array<Symbol>] names the names of defined abstract methods