Method: MacAdmin::DSLocalRecord#destroy

Defined in:
lib/macadmin/dslocal.rb

#destroy(file = @file) ⇒ Object

Delete the record

  • removes the file representing the record from disk

  • will accept an alternate path than the default; useful for debugging

  • returns true if the file was destroyed or does not exist; false otherwise



78
79
80
81
# File 'lib/macadmin/dslocal.rb', line 78

def destroy(file = @file)
  FileUtils.rm file if File.exists? file
  !File.exists? file
end