Formula: add tap? method.

This commit is contained in:
Mike McQuaid committed 2013-10-30 11:20:02 -07:00
1 parent e5089a1561
commit 8119a1d9b9
1 file changed
+4
+4
View File
@@ -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"