Class: R10K::Deployment::Basedir Private
- Inherits:
-
Object
- Object
- R10K::Deployment::Basedir
- Includes:
- Util::Purgeable
- Defined in:
- lib/r10k/deployment/basedir.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Represents a directory containing environments
Instance Method Summary collapse
-
#desired_contents ⇒ Array<String>
private
List all environments that should exist in this basedir.
-
#initialize(path, deployment) ⇒ Basedir
constructor
private
A new instance of Basedir.
-
#managed_directory ⇒ String
private
Return the path of the basedir.
Methods included from Util::Purgeable
#current_contents, #pending_contents, #purge!, #stale_contents
Constructor Details
#initialize(path, deployment) ⇒ Basedir
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Basedir.
12 13 14 15 |
# File 'lib/r10k/deployment/basedir.rb', line 12 def initialize(path,deployment) @path = path @deployment = deployment end |
Instance Method Details
#desired_contents ⇒ Array<String>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This implements a required method for the Purgeable mixin
List all environments that should exist in this basedir
29 30 31 32 33 34 35 36 |
# File 'lib/r10k/deployment/basedir.rb', line 29 def desired_contents @deployment.sources.inject([])do |list, source| if source.managed_directory == @path list += source.desired_contents end list end end |
#managed_directory ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This implements a required method for the Purgeable mixin
Return the path of the basedir
22 23 24 |
# File 'lib/r10k/deployment/basedir.rb', line 22 def managed_directory @path end |