# File lib/capistrano/configuration/variables.rb, line 72 def fetch(variable, *args) if !args.empty? && block_given? raise ArgumentError, "you must specify either a default value or a block, but not both" end sym = variable.to_sym protect(sym) do if !@variables.key?(sym) return args.first unless args.empty? return yield(variable) if block_given? raise IndexError, "`#{variable}' not found" end if @variables[sym].respond_to?(:call) @original_procs[sym] = @variables[sym] @variables[sym] = @variables[sym].call end end @variables[sym] end