Skip to content
This repository was archived by the owner on Mar 19, 2019. It is now read-only.

Commit bdcd702

Browse files
author
Rod Johnson
committed
Updated to work with rug 0.21.0
1 parent cc598dd commit bdcd702

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

operations/RootHandler.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11

22
import { Match, GraphNode } from "@atomist/rug/tree/PathExpression";
3-
import { Plan, Message, HandleEvent } from "@atomist/rug/operations/Handlers";
3+
import { Plan, HandleEvent } from "@atomist/rug/operations/Handlers";
44

55
/**
66
* Convenient event handler superclass when we're only interested in the root
7-
* match
7+
* match. This is the commonest case.
88
*/
9-
export abstract class RootHandler<R extends GraphNode> implements HandleEvent<R,R> {
9+
export abstract class RootHandler<R extends GraphNode> implements HandleEvent<R, R> {
1010

11-
handle(m: Match<R,R>): Plan | Message {
12-
return this.onMatch(m.root());
13-
}
11+
handle(m: Match<R, R>): Plan {
12+
return this.onMatch(m.root());
13+
}
1414

15-
abstract onMatch(root: R): Plan | Message;
15+
/**
16+
* Handle the given root match
17+
* @param root root node of the match
18+
*/
19+
abstract onMatch(root: R): Plan;
1620

1721
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "Helper functions for Rugs",
55
"dependencies": {
66
"@atomist/cortex": "^0.19.0",
7+
"@atomist/rug": "^0.20.0",
78
"mustache": "^2.3.0"
89
},
910
"scripts": {

0 commit comments

Comments
 (0)