-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce RuboCop::Ast::MethodDispatchNode#selector
If you need to manipulate the call-site of a method dispatch, you have to use node.loc.selector for regular methods and node.loc.keyword for syntax nodes that behave like method invocations, but are not. Super and yield nodes are an example of that. This forces us to check if node.loc responds to #keyword in a few places in rubocop proper and we can make it easier if we expose a method, here I have called it #selector, to all method dispatch nodes and work with it.
- Loading branch information
1 parent
0677018
commit 53c69cd
Showing
4 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters