-
Notifications
You must be signed in to change notification settings - Fork 208
Index attr
#3544
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
Index attr
#3544
Conversation
How to use the Graphite Merge QueueAdd the label graphite-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
@@ -254,7 +254,7 @@ def on_call_node_enter(node) | |||
case message | |||
when :private_constant | |||
handle_private_constant(node) | |||
when :attr_reader | |||
when :attr_reader, :attr |
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.
I think you can also do attr :bar, true
to make it an attr_writer
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.
TIL #3579
### Motivation As pointed out in #3544 (comment), `attr` actually accepts a boolean argument to determine if a writer is defined or not. ### Implementation Started handling the argument in a separate branch for `attr`. ### Automated Tests Improved our existing tests.
Motivation
When we added attribute indexing, we forgot to consider
attr
, which is an alias toattr_reader
.Implementation
Added
attr
in the same branch asattr_reader
.Automated Tests
Added a test.