Created
August 28, 2021 20:01
-
-
Save buildmotion/e24c2566f228c659b347ced4643ad10f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {RulePolicy} from './RulePolicy'; | |
/** | |
* Use this class as a base [extends] class for simple rules. A simple contains | |
* a single rule and target to evaluate. | |
* | |
* If you require a rule that will contain more than one rule, you should | |
* use extend the [CompositeRule] class. | |
*/ | |
export class SimpleRule extends RulePolicy { | |
/** | |
* The constructor for the simple rule. | |
* @param name: The name of the rule. | |
* @param message: The message to display if the rule is violated. | |
*/ | |
constructor(name: string, message: string, isDisplayable: boolean) { | |
super(name, message, isDisplayable); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment