Skip to content

Commit

Permalink
chore: use variable instead of calling node.parent_module_name again
Browse files Browse the repository at this point in the history
  • Loading branch information
RenzoMinelli committed Feb 10, 2023
1 parent 4e0b2ce commit 4024a6f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SpecConstantAssignment < Base
def on_casgn(node)
return unless in_spec_file?(node)
parent_module_name = node.parent_module_name
if node.parent_module_name && parent_module_name != "Object"
if parent_module_name && parent_module_name != "Object"
return
end
add_offense(node, message: MESSAGE)
Expand Down

0 comments on commit 4024a6f

Please sign in to comment.