Why do Ruby setters need “self.” qualification within the class?
Well, I think the reason this is the case is because qwerty = 4 is ambiguous—are you defining a new variable called qwerty or calling the setter? Ruby resolves this ambiguity by saying it will create a new variable, thus the self. is required. Here is another case where you need self.: class A def … Read more