-
Notifications
You must be signed in to change notification settings - Fork 22.1k
Don't expose methods and attrs for internal usage #29261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't expose methods and attrs for internal usage #29261
Conversation
|
All these classes are nodoc'ed, why not keep the Git history intact and then move to private on Ruby 2.3+? |
00ff09c to
39f967e
Compare
|
I changed to keep the Git history intact as much as possible. I think that correct visibility helps to understand the code (a reason like #26076). The TODO comments in the previous implementation followed 21e5fd4. Probably the whole of the TODO comments will be removed and will be changed attrs visibility to private in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't really private, so the change seems more misleading than explanatory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems worse than the originally proposed protected to me. History be damned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I'll change it back to originally proposed implementation.
|
Regardless of what I've said in the past, I think we should just leave these be and deal with them once we're Ruby 2.3+. @matthewd your call 👍 |
39f967e to
c2c0807
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't really private, so the change seems more misleading than explanatory.
Good point. Actually actual_source_reflection is called in ThroughReflection.
But ThroughReflection don't inherite AssociationReflection, so I moved actual_source_reflection from AssociationReflection to AbstractReflection.
c2c0807 to
ceca77d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually actual_source_reflection is called in ThroughReflection.
But ThroughReflection don't inherite AssociationReflection, so I moved actual_source_reflection from AssociationReflection to AbstractReflection.
ceca77d to
55f9b45
Compare
55f9b45 to
5734dcd
Compare
No description provided.