Classes and Variables, General Question



Hey CA forum,
I am going through the last two units in Ruby Programming Track. With that said, I am a bit confused as to why do you use variables in the methods of classes? For example below in this code,

class Computer
def method
@name = name

what is the point of that variable? Why declare that variable?


I think you could set that equal to a user's input, keeping their name or some other name.