lib/poolparty/helpers/optioner.rb in auser-poolparty-0.2.15 vs lib/poolparty/helpers/optioner.rb in auser-poolparty-0.2.16

- old
+ new

@@ -7,18 +7,22 @@ class Optioner include Configurable include MethodMissingSugar def initialize(args=[], opts={}, &block) - @arguments = args + @arguments = parse_args(args) @parse_options = opts[:parse_options] ? opts[:parse_options] : true set_default_options parse_options(&block) if @parse_options self end + def parse_args(argv, safe=[]) + argv + end + def parent self end def set_default_options @@ -45,10 +49,10 @@ opts.on_tail("-h", "--help", "Show this message") do puts opts exit end - opts.parse!(@arguments) + opts.parse(@arguments.dup) process_options output_options if verbose end def process_options \ No newline at end of file