Module: Dependabot::FileFetchers

Defined in:
lib/dependabot/file_fetchers.rb,
lib/dependabot/file_fetchers/base.rb

Defined Under Namespace

Classes: Base

Class Method Summary collapse

Class Method Details

.for_package_manager(package_manager) ⇒ Object



8
9
10
11
12
13
# File 'lib/dependabot/file_fetchers.rb', line 8

def self.for_package_manager(package_manager)
  file_fetcher = @file_fetchers[package_manager]
  return file_fetcher if file_fetcher

  raise "Unsupported package_manager #{package_manager}"
end

.register(package_manager, file_fetcher) ⇒ Object



15
16
17
# File 'lib/dependabot/file_fetchers.rb', line 15

def self.register(package_manager, file_fetcher)
  @file_fetchers[package_manager] = file_fetcher
end