Class: VagrantPlugins::AwsDns::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



10
11
12
13
# File 'lib/vagrant-aws-dns/config.rb', line 10

def initialize
  @hosted_zone_id = UNSET_VALUE
  @record_sets     = UNSET_VALUE
end

Instance Attribute Details

#hosted_zone_idObject

Returns the value of attribute hosted_zone_id.



7
8
9
# File 'lib/vagrant-aws-dns/config.rb', line 7

def hosted_zone_id
  @hosted_zone_id
end

#record_setsObject

Returns the value of attribute record_sets.



8
9
10
# File 'lib/vagrant-aws-dns/config.rb', line 8

def record_sets
  @record_sets
end

Instance Method Details

#finalize!Object



15
16
17
18
# File 'lib/vagrant-aws-dns/config.rb', line 15

def finalize!
  @hosted_zone_id = nil if @hosted_zone_id == UNSET_VALUE
  @record_sets = nil if @record_sets == UNSET_VALUE
end

#validate(machine) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/vagrant-aws-dns/config.rb', line 20

def validate(machine)
  finalize!

  errors = _detected_errors

  { 'AwsDns' => errors }
end