Method: Argvector#subcommand_with_parameters

Defined in:
lib/supplemental/facets/argvector.rb

#subcommand_with_parametersObject Also known as: subcommand

Assumes the first operand is a “subcommand” and returns it and the argments following it as parameters.



122
123
124
125
126
127
# File 'lib/supplemental/facets/argvector.rb', line 122

def subcommand_with_parameters
  opts, args = *parse_preoptions(argv)
  cmd = args.shift
  subargs = self.class.new(args, @arity)
  return [cmd, *subargs.parameters]
end