lib/applix.rb in applix-0.3.5 vs lib/applix.rb in applix-0.3.6

- old
+ new

@@ -20,12 +20,12 @@ def run argv, defaults options = (Hash.from_argv argv) options = (defaults.merge options) args = (options.delete :args) - # pre handle - @prolog_cb.call(*args, options) unless @prolog_cb.nil? + # pre handle, can modify args & options + @prolog_cb.call(args, options) unless @prolog_cb.nil? # it's either :any if task = tasks[:any] rc = task[:code].call(*args, options) else # or the task defined by the first argument @@ -34,10 +34,10 @@ rc = task[:code].call(*args, options) end # post handle unless @epilog_cb.nil? - rc = @epilog_cb.call(rc, *args, options) + rc = @epilog_cb.call(rc, args, options) end rc # return result code from handle callbacks, not the epilog_cb end