From 677bb92ba93276a986a174ce05aa5d986534639c Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Thu, 25 Aug 2022 15:05:26 +0100 Subject: [PATCH] tap: add versioned_formula_files --- Library/Homebrew/tap.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index c41753c6e7..545e0537aa 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -491,6 +491,13 @@ class Tap end end + # An array of all versioned {Formula} files of this {Tap}. + def versioned_formula_files + @versioned_formula_files ||= formula_files.select do |file| + file.basename(".rb").to_s =~ /@[\d.]+$/ + end + end + # An array of all {Cask} files of this {Tap}. def cask_files @cask_files ||= if cask_dir.directory?