3 ms·
In Ruby we use an @ / self for both instance variables (mandatory, use self to call the getter / setter and @ to interact with the variable directly) and method
by 3pt14159 12y ago
In Ruby we use an @ / self for both instance variables (mandatory, use self to call the getter / setter and @ to interact with the variable directly) and methods (self optional, generally used to reduce confusion if there might be multiple things with the same name).