Class: Tenderloin::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/tenderloin/config.rb,
lib/tenderloin/config.rb

Defined Under Namespace

Classes: Base, PackageConfig, ProvisioningConfig, SSHConfig, SharedFoldersConfig, TenderloinConfig, Top, VMConfig

Class Method Summary collapse

Class Method Details

.configObject



16
17
18
# File 'lib/tenderloin/config.rb', line 16

def config
  @config ||= Config::Top.new
end

.config_runnersObject



20
21
22
# File 'lib/tenderloin/config.rb', line 20

def config_runners
  @config_runners ||= []
end

.execute!Object



28
29
30
31
32
33
34
# File 'lib/tenderloin/config.rb', line 28

def execute!
  config_runners.each do |block|
    block.call(config)
  end

  config.loaded!
end

.reset!Object



11
12
13
14
# File 'lib/tenderloin/config.rb', line 11

def reset!
  @config = nil
  config_runners.clear
end

.run(&block) ⇒ Object



24
25
26
# File 'lib/tenderloin/config.rb', line 24

def run(&block)
  config_runners << block
end