def save(filename)
      data_to_save = @metadata.merge({
        "licenses" => licenses,
        "notices" => notices
      })

      FileUtils.mkdir_p(File.dirname(filename))
      File.write(filename, data_to_save.to_yaml)
    end
def save(filename)
      data_to_save = @metadata.merge({
        "licenses" => licenses,
        "notices" => notices
      })

      FileUtils.mkdir_p(File.dirname(filename))
      File.write(filename, data_to_save.to_yaml)
    end
Construct a new record

 licenses - a string, or array of strings, representing the content of each license
 notices - a string, or array of strings, representing the content of each legal notice
 metadata - a Hash of the metadata for the package
 Save the metadata and text to a file

 filename - The destination file to save record contents at