DEV: Fix Lint/ShadowingOuterLocalVariable (#32036)

unblocks a rubocop update
This commit is contained in:
Jarek Radosz
2025-03-27 13:50:24 +01:00
committed by GitHub
parent 4f82ceaf39
commit 29cbbd6b31
6 changed files with 14 additions and 16 deletions

View File

@ -73,14 +73,14 @@ module DiscourseAutomation
end
end
def placeholder(name = nil, triggerable: nil, &block)
def placeholder(placeholder_name = nil, triggerable: nil, &block)
if block_given?
result = yield(@automation.serialized_fields, @automation)
Array(result).each do |name|
@placeholders << { name: name.to_sym, triggerable: triggerable&.to_sym }
end
elsif name
@placeholders << { name: name.to_sym, triggerable: triggerable&.to_sym }
elsif placeholder_name
@placeholders << { name: placeholder_name.to_sym, triggerable: triggerable&.to_sym }
end
end