lib/cli/mastermind/arg_parse.rb
# Splits the incoming arguments and processes those before the first `--`.
#
# Arguments after the first `--` on the command line are passed verbatim into
# the executed plan.
Splits the incoming arguments and processes those before the first `--`.
Arguments after the first `--` on the command line are passed verbatim into
the executed plan.
Splits the incoming arguments and processes those before the first ` -- ` . Arguments after the first ` -- ` on the command line are passed verbatim into the executed plan .
def parse_arguments
      @mastermind_arguments = @initial_arguments.take_while { |arg| arg != '--' }
      @plan_arguments = @initial_arguments[(@mastermind_arguments.size + 1)..-1] || []
      unless @mastermind_arguments.empty?
        @mastermind_arguments = parser.parse *@mastermind_arguments
      end
    end
def parse_arguments @mastermind_arguments = @initial_arguments . take_while { | arg | arg != '--' } @plan_arguments = @initial_arguments [ ( @mastermind_arguments . size + 1 ) .. - 1 ] || [ ] unless @mastermind_arguments . empty? @mastermind_arguments = parser . parse * @mastermind_arguments end end
Splits the incoming arguments and processes those before the first `--`.
Splits the incoming arguments and processes those before the first ` -- ` .