summaryrefslogtreecommitdiff
path: root/lib/slop/parser.rb
diff options
context:
space:
mode:
authorLee Jarvis <ljjarvis@gmail.com>2014-11-19 10:31:26 +0000
committerLee Jarvis <ljjarvis@gmail.com>2014-11-19 10:31:26 +0000
commit14458fb36b2bcc3ff10b837dc294e23c2cbefbb7 (patch)
tree84647f033bd3a7e09f855e73521703397a899967 /lib/slop/parser.rb
parent787efb1528b4ab8f7ff752f38d0df2d22dac1f03 (diff)
downloadslop-14458fb36b2bcc3ff10b837dc294e23c2cbefbb7.tar.gz
Store executed count on options
Diffstat (limited to 'lib/slop/parser.rb')
-rw-r--r--lib/slop/parser.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/slop/parser.rb b/lib/slop/parser.rb
index 5ad9ec5..0ef4931 100644
--- a/lib/slop/parser.rb
+++ b/lib/slop/parser.rb
@@ -12,7 +12,7 @@ module Slop
# to parse a second time without duplicating state.
def reset
@used_options = []
-
+ @options.each(&:reset)
self
end
@@ -26,7 +26,7 @@ module Slop
if option = matching_option(flag)
used_options << option
- option.call(arg)
+ option.ensure_call(arg)
end
end