We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1928932 + 223f096 commit 6d437bcCopy full SHA for 6d437bc
rubocop/code_reuse_helpers.rb
@@ -25,7 +25,7 @@ def file_path_for_node(node)
25
26
# Returns the name of a constant node.
27
#
28
- # Given the AST node `(const nil :Foo)`, this method will return `:Foo`.
+ # Given the AST node `(const nil? :Foo)`, this method will return `:Foo`.
29
def name_of_constant(node)
30
node.children[1]
31
end
@@ -87,7 +87,7 @@ def in_directory?(node, directory)
87
88
# Returns the receiver name of a send node.
89
90
- # For the AST node `(send (const nil :Foo) ...)` this would return
+ # For the AST node `(send (const nil? :Foo) ...)` this would return
91
# `'Foo'`.
92
def name_of_receiver(node)
93
name_of_constant(node.children.first).to_s
0 commit comments