info: make use of Tab#to_s

Closes Homebrew/homebrew#18788.
This commit is contained in:
Jack Nagel 2013-03-27 23:07:33 -05:00
parent 5e5e82f9ef
commit ad58cd88ab

View File

@ -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"