In whenever's README, there is an example like this,
set :whenever_environment, defer { stage }
require "whenever/capistrano"
I probably understand what defer means, but I want to know how it works, and how it is implemented.
Where can I find the source code of defer?
                        
deferused to be part of the capistrano v2 gem. It is nothing more than an alias to the rubylambdaand is used only for readability purposes.As you might know in capistrano you can
setmany variables. Their values are calculated upon initialization of the capistrano script unless a value is a block. In that contextdefermakes more sense as a keyword since evaluation is defered until the variable is accessed.