From 7f0b73dbc592f44227958a24f62775ffb70babac Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 24 May 2013 10:56:02 -0500 Subject: Define inspect on Option and Options --- Library/Homebrew/options.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Library/Homebrew/options.rb') 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 -- cgit v1.2.3