Class: Vagrant::Config

Inherits:
Object
  • Object
show all
Extended by:
StackedProcRunner
Defined in:
lib/vagrant/config.rb,
lib/vagrant/config.rb

Defined Under Namespace

Classes: Base, PackageConfig, SSHConfig, Top, VMConfig, VagrantConfig

Constant Summary collapse

@@config =
nil

Class Method Summary collapse

Methods included from StackedProcRunner

proc_stack, push_proc, run_procs!

Class Method Details

.configObject



21
22
23
# File 'lib/vagrant/config.rb', line 21

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

.configures(key, klass) ⇒ Object



17
18
19
# File 'lib/vagrant/config.rb', line 17

def configures(key, klass)
  config.class.configures(key, klass)
end

.execute!Object



29
30
31
32
# File 'lib/vagrant/config.rb', line 29

def execute!
  run_procs!(config)
  config.loaded!
end

.reset!Object



12
13
14
15
# File 'lib/vagrant/config.rb', line 12

def reset!
  @@config = nil
  proc_stack.clear
end

.run(&block) ⇒ Object



25
26
27
# File 'lib/vagrant/config.rb', line 25

def run(&block)
  push_proc(&block)
end