diff options
author | Lee Jarvis <ljjarvis@gmail.com> | 2014-11-19 13:00:35 +0000 |
---|---|---|
committer | Lee Jarvis <ljjarvis@gmail.com> | 2014-11-19 13:00:35 +0000 |
commit | e3901588e3e767ffd6a08e32b535d15c5032351a (patch) | |
tree | a12273434e679ee7e5d4917e515aa48ce069c8e3 /lib/slop/parser.rb | |
parent | c811bc2e28b2326b924c69abe2e4729508f482b5 (diff) | |
download | slop-e3901588e3e767ffd6a08e32b535d15c5032351a.tar.gz |
Add custom "finish" method for options
Diffstat (limited to 'lib/slop/parser.rb')
-rw-r--r-- | lib/slop/parser.rb | 4 |
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 |