Methods

Class Index [+]

Quicksearch

Capistrano::Configuration::AliasTask

Public Instance Methods

alias_task(new_name, old_name) click to toggle source

Attempts to find the task at the given fully-qualified path, and alias it. If arguments don’t have correct task names, an ArgumentError wil be raised. If no such task exists, a Capistrano::NoSuchTaskError will be raised.

Usage:

  alias_task :original_deploy, :deploy
    # File lib/capistrano/configuration/alias_task.rb, line 13
13:       def alias_task(new_name, old_name)
14:         if !new_name.respond_to?(:to_sym) or !old_name.respond_to?(:to_sym)
15:           raise ArgumentError, "expected a valid task name"
16:         end
17: 
18:         original_task = find_task(old_name) or raise NoSuchTaskError, "the task `#{old_name}' does not exist"
19:         task = original_task.dup # Dup. task to avoid modify original task
20:         task.name = new_name
21: 
22:         define_task(task)
23:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.