Class: Bundler::Alive::Client::SourceCodeClient

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler/alive/client/source_code_client.rb

Overview

Represents a source code client

Defined Under Namespace

Classes: RateLimitExceededError, SearchRepositoryError

Instance Method Summary collapse

Constructor Details

#initialize(service_name:) ⇒ SourceCodeClient

A new instance of SourceCodeClient

Parameters:

  • service_name (Symbol)

Raises:

  • (ArgumentError)


34
35
36
37
38
39
40
41
42
43
44
# File 'lib/bundler/alive/client/source_code_client.rb', line 34

def initialize(service_name:)
  raise ArgumentError, "Unknown service: #{service_name}" unless SERVICE_WITH_STRATEGIES.key?(service_name)

  strategy = SERVICE_WITH_STRATEGIES[service_name]
  extend strategy

  @client = create_client
  @error_messages = []

  super()
end