surrogate
Version:
Object method hooks made easy
32 lines (27 loc) • 874 B
JavaScript
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "HandlerBaseRule", () => $c8150344217a984e$export$5bc87f46f3fd765a);
class $c8150344217a984e$export$5bc87f46f3fd765a {
constructor(node){
this.node = node;
}
shouldRunWithoutArgs() {
return this.options.noArgs;
}
shouldRunWithArgs() {
return !this.shouldRunWithoutArgs();
}
get options() {
return this.node.container.options;
}
get handler() {
const { container: container, context: context } = this.node;
return container.getHandler(context);
}
get context() {
const { context: context } = this.node;
return context.determineContext(this.options);
}
}
//# sourceMappingURL=surrogate.87030c3f.js.map