Method: Rake::Application#handle_options
- Defined in:
- lib/rake/application.rb
#handle_options ⇒ Object
Read and handle the command line options. Returns the command line arguments that we didn’t understand, which should (in theory) be just task names and env vars.
620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 |
# File 'lib/rake/application.rb', line 620 def # :nodoc: .rakelib = ["rakelib"] .trace_output = $stderr OptionParser.new do |opts| opts. = "#{Rake.application.name} [-f rakefile] {options} targets..." opts.separator "" opts.separator "Options are ..." opts.on_tail("-h", "--help", "-H", "Display this help message.") do puts opts exit end .each { |args| opts.on(*args) } opts.environment("RAKEOPT") end.parse(ARGV) end |