This method is deprecated or moved on the latest stable version.
The last existing version (v2_2_9) is shown here.
enhance_with_matching_rule(task_name, level=0)
public
If a rule can be found that matches the task name, enhance the task with
the prerequisites and actions from the rule. Set
the source attribute of the task appropriately for the rule. Return the
enhanced task or nil of no rule was found.
# File lib/rake/task_manager.rb, line 129
def enhance_with_matching_rule(task_name, level=0)
fail Rake::RuleRecursionOverflowError,
"Rule Recursion Too Deep" if level >= 16
@rules.each do |pattern, args, extensions, block|
if pattern.match(task_name)
task = attempt_rule(task_name, args, extensions, block, level)
return task if task
end
end
nil
rescue Rake::RuleRecursionOverflowError => ex
ex.add_target(task_name)
fail ex
end