def flag(*names)
      options = extract_options(names)
      names = [names].flatten

      verify_unused(names)
      flag = Flag.new(names,options)
      flags[flag.name] = flag

      clear_nexts
      flags_declaration_order << flag
      flag
    end
def flag(*names)
      options = extract_options(names)
      names = [names].flatten

      verify_unused(names)
      flag = Flag.new(names,options)
      flags[flag.name] = flag

      clear_nexts
      flags_declaration_order << flag
      flag
    end
Create a flag, which is a switch that takes an argument

 +names+:: a String or Symbol, or an Array of String or Symbol that represent all the different names
           and aliases for this flag.  The last element can be a hash of options:
           +:desc+:: the description, instead of using #desc
           +:long_desc+:: the long_description, instead of using #long_desc
           +:default_value+:: the default value, instead of using #default_value
           +:arg_name+:: the arg name, instead of using #arg_name
           +:must_match+:: A regexp that the flag's value must match or an array of allowable values
           +:type+:: A Class (or object you passed to GLI::App#accept) to trigger type coversion
           +:multiple+:: if true, flag may be used multiple times and values are stored in an array

 Example:

     desc 'Set the filename'
     flag [:f,:filename,'file-name']

     flag :ipaddress, :desc => "IP Address", :must_match => /\d+\.\d+\.\d+\.\d+/

     flag :names, :desc => "list of names", :type => Array

 Produces:

     -f, --filename, --file-name=arg     Set the filename