module Rake::TaskManager
def lookup(task_name, initial_scope=nil)
are recognized. If no scope argument is supplied, use the
synthesize file tasks or rules. Special scope names (e.g. '^')
This method performs straight lookups without trying to
Lookup a task, using scope and the scope hints in the task name.
def lookup(task_name, initial_scope=nil) initial_scope ||= @scope task_name = task_name.to_s if task_name =~ /^rake:/ scopes = Scope.make task_name = task_name.sub(/^rake:/, "") elsif task_name =~ /^(\^+)/ scopes = initial_scope.trim($1.size) task_name = task_name.sub(/^(\^+)/, "") else scopes = initial_scope end lookup_in_scope(task_name, scopes) end