Class: VagrantDNS::Configurator

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-dns/configurator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vm, tmp_path) ⇒ Configurator

Returns a new instance of Configurator.



7
8
9
10
# File 'lib/vagrant-dns/configurator.rb', line 7

def initialize(vm, tmp_path)
  @vm = vm
  @tmp_path = tmp_path
end

Instance Attribute Details

#tmp_pathObject

Returns the value of attribute tmp_path.



5
6
7
# File 'lib/vagrant-dns/configurator.rb', line 5

def tmp_path
  @tmp_path
end

#vmObject

Returns the value of attribute vm.



5
6
7
# File 'lib/vagrant-dns/configurator.rb', line 5

def vm
  @vm
end

Instance Method Details

#down!Object



19
20
21
# File 'lib/vagrant-dns/configurator.rb', line 19

def down!
  unregister_patterns!
end

#up!Object



12
13
14
15
16
17
# File 'lib/vagrant-dns/configurator.rb', line 12

def up!
  return unless validate_tlds
  regenerate_resolvers!
  ensure_deamon_env!
  register_patterns!
end