I Just started learning ruby and I don\'t see the difference between an @instace_variable and an attribute declared using attr_accessor.
@instace_variable
attr_accessor
Wh
attr_accesor gives you methods to read and write the instance variables. Instance variables are deasigned to be hidden from outside world so to communicate with them we should have attr_ibute accesor methods.
attr_accesor