Skip to content
This repository has been archived by the owner on Jul 14, 2018. It is now read-only.

Latest commit

 

History

History
22 lines (14 loc) · 859 Bytes

2.x-DSL-Configuration-Variables-Unset.md

File metadata and controls

22 lines (14 loc) · 859 Bytes

Definition

unset(name) 

Module

Capistrano::Configuration::Variables 

This method allows you to remove a variable from Capistrano's knowledge. Note that this is different from setting a variable to nil; if the variable is nil, Capistrano still knows about it (e.g. exists? will still return true). Calling unset, though, will purge the variable from Capistrano altogether.

set :moonboots, :awesome
puts exists?(:moonboots)     #--> prints "true"
set :moonboots, nil
puts exists?(:moonboots)     #--> prints "true"
unset :moonboots
puts exists?(:moonboots)     #--> prints "false"

Arguments

name

This should be the name of a variable that Capistrano knows about. However, if the variable is unknown to Capistrano, the method will simply do nothing, so it is not dangerous to call with any given argument.