Method: OptionParser::List#append

Defined in:
lib/optparse.rb

#append(*args) ⇒ Object

Appends switch at the tail of the list, and associates short, long and negated long options. Arguments are:

switch

OptionParser::Switch instance to be inserted.

short_opts

List of short style options.

long_opts

List of long style options.

nolong_opts

List of long style options with “no-” prefix.

append(switch, short_opts, long_opts, nolong_opts)


918
919
920
921
# File 'lib/optparse.rb', line 918

def append(*args)
  update(*args)
  @list.push(args[0])
end