test/support/explicit_interface_implementation.rb
# require that the method exist AND the arity match on the faked-out class
require that the method exist AND the arity match on the faked-out class
require that the method exist AND the arity match on the faked - out class
def implement!(method_name)
    method = @klass.instance_method(method_name)
    my_method = self.instance_method(method_name)
    unless method.arity == my_method.arity
      additional_info = if method.arity == -1
                          MESSAGE_ABOUT_NEGATIVE_ARITY
                        else
                          ""
                        end
      raise "#{@klass}'s version of #{method_name} takes #{method.arity} arguments - yours takes #{my_method.arity}#{additional_info}"
    end
  end
def implement! ( method_name ) method = @klass . instance_method ( method_name ) my_method = self . instance_method ( method_name ) unless method . arity == my_method . arity additional_info = if method . arity == - 1 MESSAGE_ABOUT_NEGATIVE_ARITY else "" end raise "#{@klass}'s version of #{method_name} takes #{method.arity} arguments - yours takes #{my_method.arity}#{additional_info}" end end
require that the method exist AND the arity match on the faked-out class
require that the method exist AND the arity match on the faked - out class
method_name
<not_specific>