# argvector.rb

Path: | lib/supplemental/facets/argvector.rb
Last Update: | Mon Dec 05 22:58:33 +0000 2011

# ArgVector

## Synopsis

ArgVector provides a very simple means of parsing command line arguments.

Unlike other more complex libs this provides only the most basic and standard parsing functionality. In many cases that‘s all one really needs.

Usage is straight foward. Simply instantiate the class and query it for the particular "views" of the command line you want.

      cargs = ArgVector.new("-a foo -b=2")

      cargs.parameters    #=> [['foo'],{'a'=>true,'b'=>'2'}]
      cargs.flags         #=> ['a']
      cargs.preoptions    #=> {'a'=>true}
      cargs.preflags      #=> ['a']
      cargs.subcommand    #=> ['foo', [], {'b'=>'2'}]

## Authors

- Thomas Sawyer

## Copying

Copyright (c) 2006 Thomas Sawyer

Ruby License

This module is free software. You may use, modify, and/or redistribute this software under the same terms as Ruby.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

### Required files

shellwords

### Constants

ArgVector | = | Argvector

[Validate]