From 578e95fcef6cfef7fa6ad63ccf626aad05d7e523 Mon Sep 17 00:00:00 2001 From: Noah Gibbs Date: Thu, 27 Jul 2023 15:33:43 +0100 Subject: [PATCH] Satisfy Rubocop --- lacci/lib/shoes/widget.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lacci/lib/shoes/widget.rb b/lacci/lib/shoes/widget.rb index a0e7daec1..4f473ea94 100644 --- a/lacci/lib/shoes/widget.rb +++ b/lacci/lib/shoes/widget.rb @@ -152,12 +152,8 @@ def destroy alias_method :remove, :destroy def clear(&block) - @children.dup.each do |child| - child.destroy - end - if block_given? - append(&block) - end + @children.dup.each(&:destroy) + append(&block) if block_given? end def append(&block)