Class: VagrantPlugins::RekeySSH::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-rekey-ssh/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



6
7
8
# File 'lib/vagrant-rekey-ssh/config.rb', line 6

def initialize
  @enable = UNSET_VALUE
end

Instance Attribute Details

#enableObject

Returns the value of attribute enable.



4
5
6
# File 'lib/vagrant-rekey-ssh/config.rb', line 4

def enable
  @enable
end

Instance Method Details

#finalize!Object



9
10
11
# File 'lib/vagrant-rekey-ssh/config.rb', line 9

def finalize!
  @enable = true if @enable == UNSET_VALUE
end

#validate(machine) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/vagrant-rekey-ssh/config.rb', line 13

def validate(machine)
  case @enable
  when TrueClass, FalseClass
    {}
  else
    {"enable" => [I18n.t("vagrant_rekey_ssh.config.enable")] }
  end
end