DELETE /memberships/1
975362
def destroy
      membership = current_user.memberships.find_by(id: params[:id])
      group = membership.group

      Group::Services::Leave.new(group: group, person: current_user).call

      redirect_to group
    end
849897
public Membership remove(Address old_member) {
        if(old_member != null) {
            synchronized(members) {
                members.remove(old_member);
            }
        }
        return this;
    }
351944
def remove(self, member):
        
        if member not in self:
            return False
        score = self._members[member]
        score_index = bisect_left(self._scores, (score, member))
        del self._scores[score_index]
        del self._members[member]
        return True
848762
def destroy
      authentication = current_user.authentications.find_by(id: params[:id])
      authentication.destroy

      redirect_to authentications_path
    end
44169
private Collection<Membership> removeMembershipByUser(Session session, String userName, boolean broadcast) throws Exception
   {
      MembershipsByUserWrapper mWrapper = findMembershipsByUser(session, userName);

      if (broadcast)
      {
         for (Membership m : mWrapper.memberships)
         {
            preDelete(m);
         }
      }

      for (Node refUserNode : mWrapper.refUserNodes)
      {
         refUserNode.remove();
      }
      session.save();

      removeFromCache(CacheHandler.USER_PREFIX + userName);

      if (broadcast)
      {
         for (Membership m : mWrapper.memberships)
         {
            postDelete(m);
         }
      }

      return mWrapper.memberships;
   }
1142415
def discard_member(self, member, pipe=None):
        
        pipe = self.redis if pipe is None else pipe
        pipe.zrem(self.key, self._pickle(member))
663689
def cleanup(self):
        
        remove = []
        for handle, assoc in self.assocs.iteritems():
            if assoc.getExpiresIn() == 0:
                remove.append(handle)
        for handle in remove:
            del self.assocs[handle]
        return len(remove), len(self.assocs)
894789
def delete_lbaas_member(self, lbaas_member, lbaas_pool):
        """"""
        return self.delete(self.lbaas_member_path % (lbaas_pool, lbaas_member))
558741
def remove(self, username, user_api, filename=None, force=False):
        """"""
        self.keys = API.__get_keys(filename)
        self.username = username
        user = user_api.find(username)[0]

        if not force:  # pragma: no cover
            self.__confirm()

        for key in self.__delete_keys():
            operation = {'sshPublicKey': [(ldap3.MODIFY_DELETE, [key])]}
            self.client.modify(user.entry_dn, operation)
931807
def purge(root=os.path.join(base.data_dir(), 'models')):
    
    """
    root = os.path.expanduser(root)
    files = os.listdir(root)
    for f in files:
        if f.endswith(".params"):
            os.remove(os.path.join(root, f))
440524
function removeAssociation($server_url, $handle)
    {
        // create Redis keys
        $serverKey = $this->associationServerKey($server_url);
        $associationKey = $this->associationKey($server_url, 
            $handle);
        
        // Removing the association from the server's association list
        $removed = $this->redis->lrem($serverKey, 0, $associationKey);
        if ($removed < 1) {
            return false;
        }

        // Delete the association itself
        return $this->redis->del($associationKey);
    }
261677
def delete(*args)
      arguments(args, required: [:user, :repo, :ref])
      params = arguments.params

      delete_request("/repos/#{arguments.user}/#{arguments.repo}/git/refs/#{arguments.ref}", params)
    end
88440
def delete(method, hmc, uri, uri_parms, logon_required):
        """"""
        try:
            resource = hmc.lookup_by_uri(uri)
        except KeyError:
            raise InvalidResourceError(method, uri)
        resource.manager.remove(resource.oid)
957231
def _rt_members_delete(self, element, statement):
        """"""
        removals = self.vparser.parse(statement, None)
        for member in removals:
            if member in element.members:
                del element.members[member]
889763
def group_memberships_destroy_many(self, ids=None, **kwargs):
        ""
        api_path = "/api/v2/group_memberships/destroy_many.json"
        api_query = {}
        if "query" in kwargs.keys():
            api_query.update(kwargs["query"])
            del kwargs["query"]
        if ids:
            api_query.update({
                "ids": ids,
            })
        return self.call(api_path, query=api_query, method="DELETE", **kwargs)
18730
def org_remove_member(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/removeMember' % object_id, input_params, always_retry=always_retry, **kwargs)
324032
def group_membership_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/group_memberships/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)