Define inspect on Option and Options
This commit is contained in:
parent
5f38c19ba8
commit
92857a7bd8
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user