Class: R10K::Deployment

Inherits:
Object
  • Object
show all
Defined in:
lib/r10k/deployment.rb

Defined Under Namespace

Classes: EnvironmentCollection

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDeployment

Returns a new instance of Deployment.



23
24
25
# File 'lib/r10k/deployment.rb', line 23

def initialize
  @config = R10K::Config.new
end

Class Method Details

.collectionObject



18
19
20
# File 'lib/r10k/deployment.rb', line 18

def collection
  instance.collection
end

.configObject



14
15
16
# File 'lib/r10k/deployment.rb', line 14

def config
  instance.config
end

.instanceObject



10
11
12
# File 'lib/r10k/deployment.rb', line 10

def instance
  @myself ||= self.new
end

Instance Method Details

#collectionObject



38
39
40
41
42
# File 'lib/r10k/deployment.rb', line 38

def collection
  @config.load_config unless @config.loaded?
  @collection ||= R10K::Deployment::EnvironmentCollection.new(@config)
  @collection
end

#configObject



27
28
29
# File 'lib/r10k/deployment.rb', line 27

def config
  @config
end

#environmentsArray<R10K::Root>

Load up all module roots

Returns:



34
35
36
# File 'lib/r10k/deployment.rb', line 34

def environments
  collection.to_a
end