Class: VagrantPlugins::DnsUpdater::Action::RemoveDnsRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-dns-updater/action/remove_dns_record.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ RemoveDnsRecord

Returns a new instance of RemoveDnsRecord.



6
7
8
9
# File 'lib/vagrant-dns-updater/action/remove_dns_record.rb', line 6

def initialize(app, env)
  @app = app
  @machine = env[:machine]
end

Instance Method Details

#call(env) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/vagrant-dns-updater/action/remove_dns_record.rb', line 11

def call(env)
  config = @machine.config.dnsupdater
  unless config.registrar.nil?
    registrar = Registrar::Registrar.load config
    registrar.remove_dns_record
  end
end