Exception: Bronze::NotImplementedError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/bronze/not_implemented_error.rb

Overview

Exception subclass to indicate an intended method has not been implemented on the receiver.

Instance Method Summary collapse

Constructor Details

#initialize(receiver, method_name) ⇒ NotImplementedError

Returns a new instance of NotImplementedError.

Parameters:

  • receiver (Object)

    The object receiving the message.

  • method_name (String)

    The name of the expected method.



11
12
13
14
15
16
# File 'lib/bronze/not_implemented_error.rb', line 11

def initialize(receiver, method_name)
  receiver_message =
    receiver.is_a?(Module) ? "#{receiver}." : "#{receiver.class}#"

  super("#{receiver_message}#{method_name} is not implemented")
end