UNPKG

867 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const enumerationset_1 = require("./enumerationset");
4class Rulecontext {
5 constructor(ruleContext) {
6 this.name = "Generic";
7 this.enumerations = [];
8 this.name = ruleContext.name;
9 this.enumerations = this.enumerations && this.enumerations.map((enumeration) => { return new enumerationset_1.default(enumeration); });
10 }
11 hasEnumerationSet(enumeration) {
12 return this.enumerations && this.enumerations.filter((enumerationSet) => { return enumerationSet.name === enumeration; }).length > 0;
13 }
14 getEnumerationSet(enumeration) {
15 return this.enumerations && this.enumerations.filter((enumerationSet) => { return enumerationSet.name === enumeration; })[0];
16 }
17}
18exports.default = Rulecontext;
19//# sourceMappingURL=rulecontext.js.map
\No newline at end of file