method_name, visibility) do |method_double, method_name, visibility|
define_method(method_name) do |*args, &block|
method_double.proxy_method_invoked(self, *args, &block)
end
__send__(visibility, method_name)
end
@method_is_proxied = true
end
def proxy_method_invoked(_obj, *args, &block)
@proxy.message_received method_name, *args, &block
end