Class: R10K::Task::Deployment::PurgeEnvironments
- Defined in:
- lib/r10k/task/deployment.rb
Constant Summary
Constants included from Logging
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(deployment) ⇒ PurgeEnvironments
constructor
A new instance of PurgeEnvironments.
Methods included from Logging
formatter, included, level, level=, levels, #logger, #logger_name, outputter, parse_level
Constructor Details
#initialize(deployment) ⇒ PurgeEnvironments
Returns a new instance of PurgeEnvironments.
115 116 117 118 |
# File 'lib/r10k/task/deployment.rb', line 115 def initialize(deployment) @deployment = deployment @basedirs = @deployment.sources.map { |x| x.basedir }.uniq end |
Instance Method Details
#call ⇒ Object
120 121 122 123 124 125 126 |
# File 'lib/r10k/task/deployment.rb', line 120 def call @basedirs.each do |path| basedir = R10K::Deployment::Basedir.new(path,@deployment) logger.info "Purging stale environments from #{path}" basedir.purge! end end |