class Interface::Error::NotImplementedError
Raised when a method has not been implemented by a class that has used the implements <InterfaceName> method.
Public Class Methods
new(class_name:, method_name:, method_arity:, interface_name:)
click to toggle source
Calls superclass method
# File lib/interface/error/not_implemented_error.rb, line 6 def initialize(class_name:, method_name:, method_arity:, interface_name:) super(error_message(class_name, method_name, method_arity, interface_name), method_name) end
Private Instance Methods
error_message(class_name, method_name, method_arity, interface_name)
click to toggle source
# File lib/interface/error/not_implemented_error.rb, line 12 def error_message(class_name, method_name, method_arity, interface_name) arity = method_arity ? "/#{method_arity}" : "" "Expected #{class_name} to implement #{method_name}#{arity} for interface #{interface_name}" end