Method: Inspec::Plugin::V2::ConfigFile#save

Defined in:
lib/inspec/plugin/v2/config_file.rb

#saveObject

Save the file to disk as a JSON structure at the path.



64
65
66
67
68
# File 'lib/inspec/plugin/v2/config_file.rb', line 64

def save
  dir = File.dirname(path)
  FileUtils.mkdir_p(dir)
  File.write(path, JSON.pretty_generate(@data))
end