gitlab-org--gitlab-foss/lib/gitlab/api_authentication/sent_through_builder.rb

20 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