1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const enumerationset_1 = require("./enumerationset");
|
4 | class 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 | }
|
18 | exports.default = Rulecontext;
|
19 |
|
\ | No newline at end of file |