Class: VagrantPlugins::HostShell::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-host-shell/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



5
6
7
# File 'lib/vagrant-host-shell/config.rb', line 5

def initialize
  @inline = UNSET_VALUE
end

Instance Attribute Details

#inlineObject

Returns the value of attribute inline.



3
4
5
# File 'lib/vagrant-host-shell/config.rb', line 3

def inline
  @inline
end

Instance Method Details

#finalize!Object



9
10
11
# File 'lib/vagrant-host-shell/config.rb', line 9

def finalize!
  @inline = nil if @inline == UNSET_VALUE
end

#validate(machine) ⇒ Object



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

def validate(machine)
  errors = _detected_errors

  unless inline
    errors << ':host_shell provisioner requires inline to be set'
  end

  { 'host shell provisioner' => errors }
end