diff options
| author | Adam Vandenberg | 2014-02-24 20:25:16 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2014-02-27 08:21:14 -0800 |
| commit | 3a6ffdac6dc2f52f2352a976fa25266f8edfcbd3 (patch) | |
| tree | 4b581d2f72bf8bbd4be97e9f6b4bc358b5ef49c9 /Library/Homebrew | |
| parent | 734e139dcbea28f79eff594a46d0faf3b1ee5a45 (diff) | |
| download | homebrew-3a6ffdac6dc2f52f2352a976fa25266f8edfcbd3.tar.bz2 | |
add Formula[]
Closes #26930
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/formula.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index e67337226..141f12636 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -359,7 +359,7 @@ class Formula def self.each names.each do |name| begin - yield Formula.factory(name) + yield Formulary.factory(name) rescue StandardError => e # Don't let one broken formula break commands. But do complain. onoe "Failed to import: #{name}" @@ -377,7 +377,7 @@ class Formula HOMEBREW_CELLAR.subdirs.map do |rack| begin - factory(rack.basename.to_s) + Formulary.factory(rack.basename.to_s) rescue FormulaUnavailableError end end.compact @@ -424,6 +424,11 @@ class Formula return name end + def self.[](name) + Formulary.factory(name) + end + + # deprecated def self.factory name Formulary.factory name end |
