Method: Rake::Application#collect_tasks
- Defined in:
- lib/rake/application.rb
#collect_tasks ⇒ Object
Collect the list of tasks on the command line. If no tasks are given, return a list containing only the default task. Environmental assignments are processed at this time as well.
680 681 682 683 684 685 686 687 688 689 690 |
# File 'lib/rake/application.rb', line 680 def collect_tasks @top_level_tasks = [] ARGV.each do |arg| if arg =~ /^(\w+)=(.*)$/m ENV[$1] = $2 else @top_level_tasks << arg unless arg =~ /^-/ end end @top_level_tasks.push(default_task_name) if @top_level_tasks.empty? end |