method
execute
v2_2_9 -
Show latest stable
- Class:
Rake::Task
execute(args=nil)public
Execute the actions associated with this task.
# File lib/rake/task.rb, line 227
def execute(args=nil)
args ||= EMPTY_TASK_ARGS
if application.options.dryrun
application.trace "** Execute (dry run) #{name}"
return
end
application.trace "** Execute #{name}" if application.options.trace
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
- all_prerequisite_tasks
- arg_description
- arg_names
- clear
- clear_actions
- clear_comments
- clear_prerequisites
- comment
- comment=
- enhance
- execute
- full_comment
- inspect
- investigation
- invoke
- invoke_prerequisites
- invoke_prerequisites_concurrently
- 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
-
collect_prerequisites -
invoke_with_call_chain - Private methods
-
add_chain_to -
add_comment -
first_sentence -
format_trace_flags -
lookup_prerequisite -
transform_comments