Tap: add alias method
This commit is contained in:
parent
7ea8a23eeb
commit
4613c9ecf5
@ -96,6 +96,18 @@ class Tap
|
|||||||
formula_files.map { |f| "#{name}/#{f.basename(".rb")}" }
|
formula_files.map { |f| "#{name}/#{f.basename(".rb")}" }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# an array of all alias files of this {Tap}.
|
||||||
|
# @private
|
||||||
|
def alias_files
|
||||||
|
Pathname.glob("#{path}/Aliases/*").select(&:file?)
|
||||||
|
end
|
||||||
|
|
||||||
|
# an array of all aliases of this {Tap}.
|
||||||
|
# @private
|
||||||
|
def aliases
|
||||||
|
alias_files.map { |f| f.basename.to_s }
|
||||||
|
end
|
||||||
|
|
||||||
# an array of all commands files of this {Tap}.
|
# an array of all commands files of this {Tap}.
|
||||||
def command_files
|
def command_files
|
||||||
Pathname.glob("#{path}/cmd/brew-*").select(&:executable?)
|
Pathname.glob("#{path}/cmd/brew-*").select(&:executable?)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user