I know that attr_accessor is defined inside the Module class, but I am trying to find the source file for the Module class and cant find it. I recursively searched in my ruby dir for ‘def attr_accessor’ and got nothing?
Any idea where it could be?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Module#attr_accessor is implemented in C. You can see the method definition if you use Pry: