Method: Trollop::Parser#stop_on

Defined in:
lib/sfp/trollop.rb

#stop_on(*words) ⇒ Object

Defines a set of words which cause parsing to terminate when encountered, such that any options to the left of the word are parsed as usual, and options to the right of the word are left intact.

A typical use case would be for subcommand support, where these would be set to the list of subcommands. A subsequent Trollop invocation would then be used to parse subcommand options, after shifting the subcommand off of ARGV.



264
265
266
# File 'lib/sfp/trollop.rb', line 264

def stop_on *words
  @stop_words = [*words].flatten
end