aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-03-27 23:07:33 -0500
committerJack Nagel2013-03-28 14:21:52 -0500
commitec5a6eb2f101ecae2f18d402261645165aceae58 (patch)
tree8b683dfb9745296803bb792eb96a7355f9cb99b2 /Library
parent74cf152787fbe413e4993e3a02a8ef534d63f54f (diff)
downloadhomebrew-ec5a6eb2f101ecae2f18d402261645165aceae58.tar.bz2
info: make use of Tab#to_s
Closes #18788.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/info.rb17
1 files changed, 3 insertions, 14 deletions
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb
index 46857d1d7..ae1904d97 100644
--- a/Library/Homebrew/cmd/info.rb
+++ b/Library/Homebrew/cmd/info.rb
@@ -99,20 +99,9 @@ module Homebrew extend self
kegs.reject! {|keg| keg.basename.to_s == '.DS_Store' }
kegs = kegs.map {|keg| Keg.new(keg) }.sort_by {|keg| keg.version }
kegs.each do |keg|
- print "#{keg} (#{keg.abv})"
- print " *" if keg.linked?
- puts
- tab = Tab.for_keg keg
-
- # Intentionally print no message if this is nil because it's unknown.
- case tab.poured_from_bottle
- when true then puts "Poured from bottle"
- when false then puts "Built from source"
- end
-
- unless tab.used_options.empty?
- puts " Installed with: #{tab.used_options*', '}"
- end
+ puts "#{keg} (#{keg.abv})#{' *' if keg.linked?}"
+ tab = Tab.for_keg(keg).to_s
+ puts " #{tab}" unless tab.empty?
end
else
puts "Not installed"