def save(path = nil)
      @path = path if path
      raise IniParseError, 'No path given to Document#save' if @path !~ /\S/
      File.open(@path, 'w') { |f| f.write(self.to_ini) }
    end
def save(path = nil)
      @path = path if path
      raise IniParseError, 'No path given to Document#save' if @path !~ /\S/
      File.open(@path, 'w') { |f| f.write(self.to_ini) }
    end
Saves a copy of this Document to disk.

 If a path was supplied when the Document was initialized then nothing
 needs to be given to Document#save. If Document was not given a file
 path, or you wish to save the document elsewhere, supply a path when
 calling Document#save.

 ==== Parameters
 path<String>:: A path to which this document will be saved.

 ==== Raises
 IniParseError:: If your document couldn't be saved.