Imagine the following code:
In the above example, the task called_with can be passed a param form the command line:
cap called_with -s branch=master
And this allows us to send a parameter, from the commandline. The output will be:
called with branch master
If you need to call a parameterized task from another task, the above task, callerz illustrates one way of getting that result. You invoke it like this:
cap callerz
And inside, it sets the variable branch to a value. The output will be:
called with branch potato
The above code was tested in capistrano 2.15.8