summaryrefslogtreecommitdiff
path: root/lib/slop/parser.rb
diff options
context:
space:
mode:
authorLee Jarvis <ljjarvis@gmail.com>2014-11-19 13:00:35 +0000
committerLee Jarvis <ljjarvis@gmail.com>2014-11-19 13:00:35 +0000
commite3901588e3e767ffd6a08e32b535d15c5032351a (patch)
treea12273434e679ee7e5d4917e515aa48ce069c8e3 /lib/slop/parser.rb
parentc811bc2e28b2326b924c69abe2e4729508f482b5 (diff)
downloadslop-e3901588e3e767ffd6a08e32b535d15c5032351a.tar.gz
Add custom "finish" method for options
Diffstat (limited to 'lib/slop/parser.rb')
-rw-r--r--lib/slop/parser.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/slop/parser.rb b/lib/slop/parser.rb
index 0ef4931..ef31ee1 100644
--- a/lib/slop/parser.rb
+++ b/lib/slop/parser.rb
@@ -30,7 +30,9 @@ module Slop
end
end
- Result.new(self)
+ Result.new(self).tap do |result|
+ used_options.each { |o| o.finish(result) }
+ end
end
def unused_options