Skip to content

Commit 7fc3cfe

Browse files
committed
Allow passing in the seed brokers in a positional argument
This is a required argument, and it's pretty central to the concept, so passing it as a positional argument makes sense.
1 parent fa5c5af commit 7fc3cfe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/kafka.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,12 @@ class FailedScramAuthentication < SaslScramError
243243
#
244244
# @see Client#initialize
245245
# @return [Client]
246-
def self.new(**options)
247-
Client.new(**options)
246+
def self.new(seed_brokers = nil, **options)
247+
if seed_brokers.nil?
248+
Client.new(**options)
249+
else
250+
Client.new(seed_brokers: seed_brokers, **options)
251+
end
248252
end
249253
end
250254

0 commit comments

Comments
 (0)