Handle errors in composite commands

This commit is contained in:
Jorge Manrubia
2025-05-13 11:43:38 +02:00
parent 04ee9925e7
commit 0ff984dddd
2 changed files with 12 additions and 2 deletions
+4
View File
@@ -28,6 +28,10 @@ class Command::Composite
commands.any?(&:needs_confirmation?)
end
def valid?
commands.all?(&:valid?)
end
private
def undoable_commands
commands.filter(&:undoable?)