import Word from "./word";

export class Rule {

        public selector: string;
        public event: string;
        public prefix: string;
        public suffix: string;
        public code: string;

    constructor(event, prefix, suffix, selector?, code?) {
        this.selector = selector;
        this.event = event;
        this.prefix = prefix;
        this.suffix = suffix;
        this.code = code;
    }

    public isMatched(word: Word): boolean {
        return this.prefix === word.prefix ;
    }

}
