Module: DNSUpdater::Updaters
- Defined in:
- lib/dnsupdater/updaters.rb,
lib/dnsupdater/updaters/ssh.rb,
lib/dnsupdater/updaters/http.rb,
lib/dnsupdater/updaters/updater.rb,
lib/dnsupdater/updaters/powerdns.rb
Overview
Module for DNS updater implementations
Defined Under Namespace
Classes: HTTP, PowerDNS, SSH, Updater
Constant Summary
collapse
- @@Updaters =
{}
Class Method Summary
collapse
Class Method Details
.get(protocol) ⇒ Object
16
17
18
|
# File 'lib/dnsupdater/updaters.rb', line 16
def self.get(protocol)
@@Updaters[protocol]
end
|
.getAllProtocols ⇒ Object
20
21
22
|
# File 'lib/dnsupdater/updaters.rb', line 20
def self.getAllProtocols
@@Updaters.keys
end
|
.getHostPort(protocol, config) ⇒ Object
24
25
26
27
28
|
# File 'lib/dnsupdater/updaters.rb', line 24
def self.getHostPort(protocol, config)
raise "Protocol '#{protocol}' not registered!" unless has?(protocol)
@@Updaters[protocol].getHostPort(config)
end
|
.has?(protocol) ⇒ Boolean
12
13
14
|
# File 'lib/dnsupdater/updaters.rb', line 12
def self.has?(protocol)
@@Updaters.key?(protocol)
end
|
.register(protocol, updater) ⇒ Object
8
9
10
|
# File 'lib/dnsupdater/updaters.rb', line 8
def self.register(protocol, updater)
@@Updaters[protocol.downcase.to_sym] = updater
end
|