def add_or_update(username, realm, password)
      if has_entry?(username, realm) then
        update(username, realm, password)
      else
        add(username, realm, password)
      end
    end
def add_or_update(username, realm, password)
      if has_entry?(username, realm) then
        update(username, realm, password)
      else
        add(username, realm, password)
      end
    end
Public: Add or update username / realm entry with the new password.
 This will add a new entry if the username / realm combination does not
 exist in the file. If the entry does exist in the file, then the password
 of the entry is updated to the new password.

 The file is not written to disk until #save! is called.

 username - the username of the entry
 realm    - the realm of the entry
 password - the password of the entry

 Examples

   digest_file.add_or_update("newuser", "realm", "password")
   digest_file.save!

 Returns nothing.