Class: VagrantPlugins::VagrantJson::Config::Json

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeJson

Returns a new instance of Json.



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

def initialize
  @directory = UNSET_VALUE
end

Instance Attribute Details

#directoryObject

Returns the value of attribute directory.



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

def directory
  @directory
end

Instance Method Details

#finalize!Object



11
12
13
14
15
# File 'lib/vagrant-json/config/json.rb', line 11

def finalize!
  if @directory == UNSET_VALUE
    @directory = ".vagrant_config"
  end
end

#validate(machine) ⇒ Object



17
18
19
# File 'lib/vagrant-json/config/json.rb', line 17

def validate(machine)
  { "json" => _detected_errors }
end