summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorsigurdsvela <sigurdbergsvela@gmail.com>2015-04-07 14:37:23 +0200
committersigurdsvela <sigurdbergsvela@gmail.com>2015-04-07 14:37:23 +0200
commit5c254f0406c1246c3e07ea781cc2dfded5a09a36 (patch)
tree9b7e827e07c7b137f843c2484dc1b7a77d58694f /lib
parent3c572378fa8dd437bfb323c9cab39f95ed9a5341 (diff)
downloadslop-5c254f0406c1246c3e07ea781cc2dfded5a09a36.tar.gz
Rewrite MissingOption.getFlags() to flags
Removes the MissingOption.getFlags() function and replaces it with attr_reader :flags
Diffstat (limited to 'lib')
-rw-r--r--lib/slop/error.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/slop/error.rb b/lib/slop/error.rb
index d942bbd..74453e3 100644
--- a/lib/slop/error.rb
+++ b/lib/slop/error.rb
@@ -12,15 +12,13 @@ module Slop
# executed without one. Suppress with the `suppress_errors`
# config option.
class MissingArgument < Error
- def initialize(msg, argument)
- super(msg)
- @argument = argument
- end
+ attr_reader :flags;
- #Get all the flags that matches
- #the option with the missing argument
- def getFlags()
- return @argument
+ # Get all the flags that matches
+ # the option with the missing argument
+ def initialize(msg, flags)
+ super(msg)
+ @flags = flags
end
end