aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2013-10-29 15:46:10 -0400
committerMike McQuaid2013-10-30 11:20:02 -0700
commit4c0fd46329a3180d079f34377584ccd5568b99aa (patch)
treedb2e5303e91d2f8149f3a78b712cc38305d8c75d /Library
parent202c6ef8262ca95bc5362bb431377c14847a3679 (diff)
downloadbrew-4c0fd46329a3180d079f34377584ccd5568b99aa.tar.bz2
Formula: add tap? method.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb4
1 files changed, 4 insertions, 0 deletions
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"