Formula: add tap? method.

This commit is contained in:
Mike McQuaid 2013-10-29 15:46:10 -04:00
parent 202c6ef826
commit 4c0fd46329

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"