aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/options.rb
diff options
context:
space:
mode:
authorJack Nagel2013-05-24 10:56:02 -0500
committerJack Nagel2013-05-24 10:56:02 -0500
commit7f0b73dbc592f44227958a24f62775ffb70babac (patch)
tree82f35935ef43863268fe941a420011697dd2a9bc /Library/Homebrew/options.rb
parent8c2e64b3faf8a444c2e7ca2edb8c3073e0c626dd (diff)
downloadhomebrew-7f0b73dbc592f44227958a24f62775ffb70babac.tar.bz2
Define inspect on Option and Options
Diffstat (limited to 'Library/Homebrew/options.rb')
-rw-r--r--Library/Homebrew/options.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/options.rb b/Library/Homebrew/options.rb
index 7bfbb6a8c..1545128f5 100644
--- a/Library/Homebrew/options.rb
+++ b/Library/Homebrew/options.rb
@@ -31,6 +31,10 @@ class Option
name.hash
end
+ def inspect
+ "#<#{self.class}: #{flag.inspect}>"
+ end
+
private
def split_name(name)
@@ -101,6 +105,10 @@ class Options
end
alias_method :to_ary, :to_a
+ def inspect
+ "#<#{self.class}: #{@options.map(&:inspect).join(", ")}>"
+ end
+
def self.coerce(arg)
case arg
when self then arg