The download_ntds function isn using @ip for anything, but still you're sending the argument. On the other hand, if you are using @ip as instance variable, there is no need to keep sending is as argument. download_ntds will have access to the variable