From a69fc114598fe4ad034aaec823051e0ea28600d3 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Wed, 26 Apr 2023 09:11:21 -0700 Subject: [PATCH] Hoist public method --- Library/Homebrew/utils/autoremove.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Library/Homebrew/utils/autoremove.rb b/Library/Homebrew/utils/autoremove.rb index 8b9d63f052..aad6d89990 100644 --- a/Library/Homebrew/utils/autoremove.rb +++ b/Library/Homebrew/utils/autoremove.rb @@ -7,6 +7,15 @@ module Utils # @private module Autoremove class << self + # An array of {Formula} without {Formula} or {Cask} + # dependents that weren't installed on request and without + # build dependencies for {Formula} installed from source. + # @private + def removable_formulae(formulae, casks) + unused_formulae = unused_formulae_with_no_formula_dependents(formulae) + unused_formulae - formulae_with_cask_dependents(casks) + end + # An array of all installed {Formula} with {Cask} dependents. # @private def formulae_with_cask_dependents(casks) @@ -54,15 +63,6 @@ module Utils unused_formulae end private_class_method :unused_formulae_with_no_formula_dependents - - # An array of {Formula} without {Formula} or {Cask} - # dependents that weren't installed on request and without - # build dependencies for {Formula} installed from source. - # @private - def removable_formulae(formulae, casks) - unused_formulae = unused_formulae_with_no_formula_dependents(formulae) - unused_formulae - formulae_with_cask_dependents(casks) - end end end end