From 4c0fd46329a3180d079f34377584ccd5568b99aa Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 29 Oct 2013 15:46:10 -0400 Subject: Formula: add tap? method. --- Library/Homebrew/formula.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Library') diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index e0c9921cd..92b7d40a0 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -437,6 +437,10 @@ class Formula Formulary.factory name end + def tap? + !!path.realpath.to_s.match(HOMEBREW_TAP_DIR_REGEX) + end + def tap if path.realpath.to_s =~ HOMEBREW_TAP_DIR_REGEX "#$1/#$2" -- cgit v1.2.3