File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -86,16 +86,18 @@ public final class CommandRegistry<ClientError: Error> {
86
86
87
87
public init ( ) { }
88
88
89
- /// Registers the given command , making it available to run.
89
+ /// Registers the given commands , making those available to run.
90
90
///
91
- /// If another command was already registered with the same `verb`, it will
92
- /// be overwritten.
91
+ /// If another commands were already registered with the same `verb`s, those
92
+ /// will be overwritten.
93
93
@discardableResult
94
- public func register< C: CommandProtocol > ( _ command : C )
94
+ public func register< C: CommandProtocol > ( _ commands : C ... )
95
95
-> CommandRegistry
96
96
where C. ClientError == ClientError , C. Options. ClientError == ClientError
97
97
{
98
- commandsByVerb [ command. verb] = CommandWrapper ( command)
98
+ for command in commands {
99
+ commandsByVerb [ command. verb] = CommandWrapper ( command)
100
+ }
99
101
return self
100
102
}
101
103
You can’t perform that action at this time.
0 commit comments