Method: Trollop::Parser#stop_on
- Defined in:
- lib/html2email/vendor/premailer/bin/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.
268 269 270 |
# File 'lib/html2email/vendor/premailer/bin/trollop.rb', line 268 def stop_on *words @stop_words = [*words].flatten end |