debian-mirror-gitlab/lib/gitlab/api_authentication/sent_through_builder.rb
2021-03-08 18:12:59 +05:30

19 lines
415 B
Ruby

# frozen_string_literal: true
# See Gitlab::APIAuthentication::Builder
module Gitlab
module APIAuthentication
class SentThroughBuilder
def initialize(strategies, resolvers)
@strategies = strategies
@resolvers = resolvers
end
def sent_through(*locators)
locators.each do |locator|
@strategies[locator] |= @resolvers
end
end
end
end
end