public function clearRules(int $crud = NULL)
    {
        if ($crud == NULL) {
            $this->rules = [];
            return true;
        }

        $ruleSet = [];
        foreach ($this->rules as $rule) {
            if (!$rule->crud & $crud) {
                $ruleSet[] = $rule;
            }
        }
        $this->rules = $ruleSet;
        return true;
    }