Module: Dependabot::DependencyGraphers

Extended by:
T::Sig
Defined in:
lib/dependabot/dependency_graphers.rb,
lib/dependabot/dependency_graphers/base.rb,
lib/dependabot/dependency_graphers/generic.rb

Defined Under Namespace

Classes: Base, Generic, ResolvedDependency

Class Method Summary collapse

Class Method Details

.for_package_manager(package_manager) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/dependabot/dependency_graphers.rb', line 16

def self.for_package_manager(package_manager)
  grapher = @graphers[package_manager]
  return grapher if grapher

  # If an ecosystem has not defined its own graphing strategy, then we use
  # a best-effort generic while we are rolling out graphing capabilities.
  #
  # This approach allows us to assess the quality of data from the ecosystem's
  # parser and triage the scope of work to implement the non-generic class.
  Generic
end

.register(package_manager, grapher) ⇒ Object



29
30
31
# File 'lib/dependabot/dependency_graphers.rb', line 29

def self.register(package_manager, grapher)
  @graphers[package_manager] = grapher
end