Class: CfDeployer::Driver::DryRun

Inherits:
Object
  • Object
show all
Defined in:
lib/cf_deployer/driver/dry_run.rb

Constant Summary collapse

@@enabled =
false

Class Method Summary collapse

Class Method Details

.disableObject



12
13
14
15
# File 'lib/cf_deployer/driver/dry_run.rb', line 12

def self.disable
  CfDeployer::Log.info "Disabling Dry-Run Mode"
  @@enabled = false
end

.enableObject



7
8
9
10
# File 'lib/cf_deployer/driver/dry_run.rb', line 7

def self.enable
  CfDeployer::Log.info "Enabling Dry-Run Mode"
  @@enabled = true
end

.guard(description) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/cf_deployer/driver/dry_run.rb', line 17

def self.guard description
  if @@enabled
    CfDeployer::Log.info "<Dry Run Enabled>  #{description}"
  else
    yield
  end
end