aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/info.rb
diff options
context:
space:
mode:
authorCharlie Sharpsteen2011-09-11 12:57:53 -0700
committerCharlie Sharpsteen2011-09-16 08:55:38 -0700
commit06fbecbeaefbcd82db8e0215b964e30ef3378ff0 (patch)
treedb106759536b6b2c05fcecd96e61d2e840b33168 /Library/Homebrew/cmd/info.rb
parent8c9f595a834b324d53f461f4f9b81bcfc33dcc18 (diff)
downloadhomebrew-06fbecbeaefbcd82db8e0215b964e30ef3378ff0.tar.bz2
Centralize definition of `rack` in formula.rb
`rack` is a commonly used alias for `formula.prefix.parent`---so common that it gets defined and used quite a bit. This patch makes `rack` an official method of the `Formula` class.
Diffstat (limited to 'Library/Homebrew/cmd/info.rb')
-rw-r--r--Library/Homebrew/cmd/info.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb
index 637e849c5..9c950801a 100644
--- a/Library/Homebrew/cmd/info.rb
+++ b/Library/Homebrew/cmd/info.rb
@@ -50,9 +50,8 @@ module Homebrew extend self
puts "Depends on: #{f.deps*', '}" unless f.deps.empty?
- rack = f.prefix.parent
- if rack.directory?
- kegs = rack.children
+ if f.rack.directory?
+ kegs = f.rack.children
kegs.each do |keg|
next if keg.basename.to_s == '.DS_Store'
print "#{keg} (#{keg.abv})"