Sha256: 0e16e80b2e94a64b4d3f3664d84ba9c04bf55e3958b995c9717a38517798f5c6
Contents?: true
Size: 1.88 KB
Versions: 1
Compression:
Stored size: 1.88 KB
Contents
U:RDoc::AnyMethod[iI"stop_on_unknown_option!:EFI"+Bundler::Thor::stop_on_unknown_option!;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"GStop parsing of options as soon as an unknown option or a regular ;TI"Rargument is encountered. All remaining arguments are passed to the command. ;TI"PThis is useful if you have a command that can receive arbitrary additional ;TI"Joptions, and where those additional options should not be handled by ;TI"Bundler::Thor.;To:RDoc::Markup::BlankLine S:RDoc::Markup::Heading: leveli : textI"Example;T@o; ; [ I"RTo better understand how this is useful, let's consider a command that calls ;TI"Ian external command. A user may want to pass arbitrary options and ;TI"Oarguments to that command. The command itself also accepts some options, ;TI".which should be handled by Bundler::Thor.;T@o:RDoc::Markup::Verbatim; [I"0class_option "verbose", :type => :boolean ;TI"#stop_on_unknown_option! :exec ;TI".check_unknown_options! :except => :exec ;TI" ;TI"(desc "exec", "Run a shell command" ;TI"def exec(*args) ;TI"5 puts "diagnostic output" if options[:verbose] ;TI" Kernel.exec(*args) ;TI" end ;T:@format0o; ; [I"JHere +exec+ can be called with +--verbose+ to get diagnostic output, ;TI" e.g.:;T@o;; [I"$$ thor exec --verbose echo foo ;TI"diagnostic output ;TI" foo ;T;0o; ; [I"NBut if +--verbose+ is given after +echo+, it is passed to +echo+ instead:;T@o;; [I"$$ thor exec echo --verbose foo ;TI"--verbose foo ;T;0S;; i ;I"Parameters;To:RDoc::Markup::List: @type: NOTE:@items[o:RDoc::Markup::ListItem:@label[I"Symbol ...;T; [o; ; [I"0A list of commands that should be affected.;T: @fileI"(lib/bundler/vendor/thor/lib/thor.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(*command_names);T@AFI" Thor;TcRDoc::NormalClass00
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
enju_leaf-1.2.1 | vendor/bundle/ruby/2.3/doc/bundler-1.14.6/ri/Bundler/Thor/stop_on_unknown_option%21-c.ri |