We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7585871 commit af634e9Copy full SHA for af634e9
Sources/Commandant/Command.swift
@@ -91,11 +91,13 @@ public final class CommandRegistry<ClientError: Error> {
91
/// If another command was already registered with the same `verb`, it will
92
/// be overwritten.
93
@discardableResult
94
- public func register<C: CommandProtocol>(_ command: C)
+ public func register<C: CommandProtocol>(_ commands: C...)
95
-> CommandRegistry
96
where C.ClientError == ClientError, C.Options.ClientError == ClientError
97
{
98
- commandsByVerb[command.verb] = CommandWrapper(command)
+ for command in commands {
99
+ commandsByVerb[command.verb] = CommandWrapper(command)
100
+ }
101
return self
102
}
103
0 commit comments