Module: Homebrew::Missing Private

Defined in:
missing.rb

This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.

Class Method Summary collapse

Class Method Details

.deps(formulae, casks = [], hide = [], &_block) ⇒ Hash{String => Array<String>}

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Parameters:

Returns:



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'missing.rb', line 16

def self.deps(formulae, casks = [], hide = [], &_block)
  missing = {}
  formulae.each do |formula|
    missing_dependencies = formula.missing_dependencies(hide: hide).map(&:to_s)
    next if missing_dependencies.empty?

    yield formula.full_name, missing_dependencies if block_given?
    missing[formula.full_name] = missing_dependencies
  end

  casks.each do |cask|
    missing_dependencies = cask_deps(cask, hide)
    next if missing_dependencies.empty?

    yield cask.full_name, missing_dependencies if block_given?
    missing[cask.full_name] = missing_dependencies
  end
  missing
end