diff options
Diffstat (limited to 'lib/slop/option.rb')
-rw-r--r-- | lib/slop/option.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/slop/option.rb b/lib/slop/option.rb index c63fd1a..0e92e76 100644 --- a/lib/slop/option.rb +++ b/lib/slop/option.rb @@ -122,6 +122,14 @@ class Slop end end + def eql?(other) + short and short == other.short or long and long == other.long + end + + def hash + [short, long].hash + end + # Returns the help String for this option. def to_s return config[:help] if config[:help].respond_to?(:to_str) |