Class: Messhy::DnsManager
- Inherits:
-
Object
- Object
- Messhy::DnsManager
- Defined in:
- lib/messhy/dns_manager.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#dry_run ⇒ Object
readonly
Returns the value of attribute dry_run.
-
#ssh_executor ⇒ Object
readonly
Returns the value of attribute ssh_executor.
Instance Method Summary collapse
-
#initialize(config, ssh_executor: SSHExecutor.new(config), dry_run: false, skip: nil) ⇒ DnsManager
constructor
A new instance of DnsManager.
- #setup ⇒ Object
Constructor Details
#initialize(config, ssh_executor: SSHExecutor.new(config), dry_run: false, skip: nil) ⇒ DnsManager
Returns a new instance of DnsManager.
9 10 11 12 13 14 |
# File 'lib/messhy/dns_manager.rb', line 9 def initialize(config, ssh_executor: SSHExecutor.new(config), dry_run: false, skip: nil) @config = config @ssh_executor = ssh_executor @dry_run = dry_run @skip = skip end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/messhy/dns_manager.rb', line 7 def config @config end |
#dry_run ⇒ Object (readonly)
Returns the value of attribute dry_run.
7 8 9 |
# File 'lib/messhy/dns_manager.rb', line 7 def dry_run @dry_run end |
#ssh_executor ⇒ Object (readonly)
Returns the value of attribute ssh_executor.
7 8 9 |
# File 'lib/messhy/dns_manager.rb', line 7 def ssh_executor @ssh_executor end |
Instance Method Details
#setup ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/messhy/dns_manager.rb', line 16 def setup return unless config.dns_enabled? case config.dns_provider when 'dnsmasq' setup_dnsmasq else raise Error, "Unsupported DNS provider: #{config.dns_provider}" end end |