Exception: Brut::Framework::Errors::AbstractMethod

Inherits:
Brut::Framework::Error show all
Defined in:
lib/brut/framework/errors/abstract_method.rb

Overview

Raised when a method must be defined by a subclass. This is useful for making it clear which methods a subclass is expected to override and for which no default behavior makes sense.

Instance Method Summary collapse

Constructor Details

#initialize(method_name = nil) ⇒ AbstractMethod

Returns a new instance of AbstractMethod.



5
6
7
8
9
10
11
# File 'lib/brut/framework/errors/abstract_method.rb', line 5

def initialize(method_name=nil)
  if method_name
    super("The method `#{method_name}` must be implemented")
  else
    super("An abstract method must be implemented")
  end
end