aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-12-06 21:15:43 +0800
committerXu Cheng2015-12-09 16:56:59 +0800
commitea81963b8a4a683ef11b3aaafef053cfad64bdea (patch)
tree94d1c3de907e6fdd0a89979a7a548abd026386db /Library
parent327286cdfb068e8a1763849b321fdec2c3517ed2 (diff)
downloadbrew-ea81963b8a4a683ef11b3aaafef053cfad64bdea.tar.bz2
add Tap#alias_dir
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/tap.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb
index d5678c1a8..5dbe28a05 100644
--- a/Library/Homebrew/tap.rb
+++ b/Library/Homebrew/tap.rb
@@ -171,10 +171,16 @@ class Tap
@formula_names ||= formula_files.map { |f| "#{name}/#{f.basename(".rb")}" }
end
+ # path to the directory of all alias files for this {Tap}.
+ # @private
+ def alias_dir
+ path/"Aliases"
+ end
+
# an array of all alias files of this {Tap}.
# @private
def alias_files
- @alias_files ||= Pathname.glob("#{path}/Aliases/*").select(&:file?)
+ @alias_files ||= Pathname.glob("#{alias_dir}/*").select(&:file?)
end
# an array of all aliases of this {Tap}.