Class: Gitlab::APIAuthentication::SentThroughBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/api_authentication/sent_through_builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(strategies, resolvers) ⇒ SentThroughBuilder

Returns a new instance of SentThroughBuilder.



7
8
9
10
# File 'lib/gitlab/api_authentication/sent_through_builder.rb', line 7

def initialize(strategies, resolvers)
  @strategies = strategies
  @resolvers = resolvers
end

Instance Method Details

#sent_through(*locators) ⇒ Object



12
13
14
15
16
# File 'lib/gitlab/api_authentication/sent_through_builder.rb', line 12

def sent_through(*locators)
  locators.each do |locator|
    @strategies[locator] |= @resolvers
  end
end