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
commit8119a1d9b9f82b0c4e48b8ebcd4e85000ebed95e (patch)
tree92f05ee2d6c00a4d65a489a907ccdcb93f7808a2 /Library
parente5089a15618da64dfedcbd39458c096bd377e60e (diff)
downloadhomebrew-8119a1d9b9f82b0c4e48b8ebcd4e85000ebed95e.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"