Formula: add tap? method.
This commit is contained in:
parent
202c6ef826
commit
4c0fd46329
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user