Module: Cult::CLI::OptionParserExtensions
- Defined in:
- lib/cult/cli/cri_extensions.rb
Overview
This extension stops option processing at the first non-option bare-word. Without it, further arguments that look like options are treated as such. use-case:
cult node ssh SomeNode ls -l
Instance Method Summary collapse
Instance Method Details
#run ⇒ Object
39 40 41 42 43 |
# File 'lib/cult/cli/cri_extensions.rb', line 39 def run peek = @unprocessed_arguments_and_options[0] @no_more_options = true if peek && peek[0] != '-' super end |