Library/Homebrew/requirement.rb
# Expand the requirements of dependent recursively, optionally yielding
# [dependent, req] pairs to allow callers to apply arbitrary filters to
# the list.
# The default filter, which is applied when a block is not given, omits
# optionals and recommendeds based on what the dependent has asked for.
Expand the requirements of dependent recursively, optionally yielding
[dependent, req] pairs to allow callers to apply arbitrary filters to
the list.
The default filter, which is applied when a block is not given, omits
optionals and recommendeds based on what the dependent has asked for.
Expand the requirements of dependent recursively optionally yielding [ dependent req ] pairs to allow callers to apply arbitrary filters to the list . The default filter which is applied when a block is not given omits optionals and recommendeds based on what the dependent has asked for .
def expand(dependent, &block)
      reqs = ComparableSet.new
      formulae = dependent.recursive_dependencies.map(&:to_formula)
      formulae.unshift(dependent)
      formulae.each do |f|
        f.requirements.each do |req|
          if prune?(f, req, &block)
            next
          else
            reqs << req
          end
        end
      end
      reqs
    end
def expand ( dependent , & block ) reqs = ComparableSet . new formulae = dependent . recursive_dependencies . map ( & :to_formula ) formulae . unshift ( dependent ) formulae . each do | f | f . requirements . each do | req | if prune? ( f , req , & block ) next else reqs << req end end end reqs end
Expand the requirements of dependent recursively, optionally yielding
[dependent, req] pairs to allow callers to apply arbitrary filters to
the list.
Expand the requirements of dependent recursively optionally yielding [ dependent req ] pairs to allow callers to apply arbitrary filters to the list .
dependent
<not_specific>
block
<not_specific>