aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/tab.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb
index b4a85b64e..35b40ec41 100644
--- a/Library/Homebrew/tab.rb
+++ b/Library/Homebrew/tab.rb
@@ -104,4 +104,18 @@ class Tab < OpenStruct
def write
tabfile.write to_json
end
+
+ def to_s
+ s = []
+ case poured_from_bottle
+ when true then s << "Poured from bottle"
+ when false then s << "Built from source"
+ end
+ unless used_options.empty?
+ s << "Installed" if s.empty?
+ s << "with:"
+ s << used_options.to_a.join(", ")
+ end
+ s.join(" ")
+ end
end