method
execute
v1_9_3_125 -
Show latest stable
- Class:
Rake::Task
execute(args=nil)public
Execute the actions associated with this task.
# File lib/rake/task.rb, line 190
def execute(args=nil)
args ||= EMPTY_TASK_ARGS
if application.options.dryrun
$stderr.puts "** Execute (dry run) #{name}"
return
end
if application.options.trace
$stderr.puts "** Execute #{name}"
end
application.enhance_with_matching_rule(name) if @actions.empty?
@actions.each do |act|
case act.arity
when 1
act.call(self)
else
act.call(self, args)
end
end
end Related methods
- Instance methods
- add_description
- arg_description
- arg_names
- clear
- clear_actions
- clear_prerequisites
- comment=
- enhance
- execute
- inspect
- investigation
- invoke
- invoke_prerequisites
- name
- name_with_args
- needed?
- prerequisite_tasks
- reenable
- set_arg_names
- source
- sources
- timestamp
- to_s
- Class methods
- []
- clear
- create_rule
- define_task
- new
- scope_name
- task_defined?
- tasks
- Protected methods
-
invoke_with_call_chain - Private methods
-
add_chain_to -
add_comment -
format_trace_flags -
lookup_prerequisite